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;
精彩评论