如何在数据库中使用serialize存储内部foreach的输出? next:调用数据库?
请举个例子。
foreach($upload_data as $file) {
echo serialize($file['file']);
}
output: s:54:"Chrysanthemum6.jpg";s:47:"/Desert6.jpg";
尊重
答案 0 :(得分:0)
将序列号存储在变量中?
$result = '';
foreach($upload_data as $file) {
$result .= serialize($file['file'];
}
echo $result;
答案 1 :(得分:0)
这样的东西?
$result = array();
foreach ($upload_data as $file) {
$result[] = $file['file'];
}
var_dump(serialize($result));