我的 HTML
<input type="textbox" name="bus[]" value="">
<input type="textbox" name="bus[]" value="">
<input type="textbox" name="bus[]" value="">
<input type="textbox" name="bus[]" value="">
我的脚本
$busac = $_post[bus];
$busaccount = count($busac);
if($busaccount != 0){
for($bc=0;$bc<$busaccount;$bc++){
$acbusmodel[]=array('bus'=>array('busmodel'=>array('local'=>$busrsac[$bc],'others'=>$busdollar[$bc])));
} // endforeach
}
foreach($acbusmodel as $key=>$value) {
$values[$key] = $value;
$acvalue .= $value;
print_r($value);
}
Array ( [0] => Array ( [bus] => Array ( [busmodel] => Array ( [local] => 1 [others] => 1 ) ) ) [1] => Array ( [bus] => Array ( [busmodel] => Array ( [local] => 2 [others] => 2 ) ) ) [2] => Array ( [bus] => Array ( [busmodel] => Array ( [local] => 3 [others] => 3 ) ) ) )
上面是显示代码
我想要这样的代码
Array ( [bus] => Array ( [busmodel] => Array ( [local] => 1 [others] => 1 ) ) ) Array ( [bus] => Array ( [busmodel] => Array ( [local] => 2 [其他] => 2 ) ) ) 数组 ( [bus] => 数组 ( [busmodel] => 数组 ( [local] => 3 [others] => 3 ) ) )
我想将值保存在单个字符串中..