开发者

output inside foreach by serialize, store in database

how can output of inside foreach with serialize store in database? next: called of database?

please give me example.

foreach($upload_data as $file) {
    echo serialize($file['file']);
}
output: s:54:"Chrysanthemum6.jpg";开发者_StackOverflow社区s:47:"/Desert6.jpg";

With respect


Something like this?

$result = array();
foreach ($upload_data as $file) {
  $result[] = $file['file'];
}
var_dump(serialize($result));


store the serialize in a variable?

$result = '';
foreach($upload_data as $file) {
  $result .= serialize($file['file'];
}
echo $result;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜