NevemTeve
2012.01.11
|
|
0 0
9211
|
Szerintem itt egy kis programozás segítene... minta:
#!/usr/local/bin/php <?php error_reporting (E_NOTICE | E_ALL | E_STRICT);
$inp = "id[34]=null&id[35]=34.7&id[36]=35&id[37]=36&id[38]=guzu=van";
$arrtmp= explode ('&', $inp);
$arr= array (); foreach ($arrtmp as &$value) { $tmp= explode ('=', $value, 2); $val= &$tmp[1]; $tmp= explode ('[',$tmp[0]); $tmp= explode (']',$tmp[1]); $key= $tmp[0]; if (is_numeric ($val) && $val==intval($val)) $val= intval ($val); $arr[$key]= $val; } unset ($arrtmp); var_dump ($arr); ?>
|
Előzmény: hellsing (9210)
|
|