1
使用爆炸我已转换的字符串转换成阵列,PHP字符串(键和val必须是相同的字符串)
但阵列看起来像 阵列([0] = - >根)
但我想我让我的财产以后阵列状阵列([根] =>根)
如何使这种方式..
感谢
使用爆炸我已转换的字符串转换成阵列,PHP字符串(键和val必须是相同的字符串)
但阵列看起来像 阵列([0] = - >根)
但我想我让我的财产以后阵列状阵列([根] =>根)
如何使这种方式..
感谢
$array = explode($separator, $some_string);
$array = array_combine($array, $array);
你可以把它的像这样的关联数组:
$exploded = explode (.......);
$exploded_associative = array();
foreach ($exploded as $part)
if ($part)
$exploded_associative[$part] = $part;
print_r($exploded_associative); // Will output "root" => "root" ....
你到底需要什么?
你需要什么? – 2010-04-05 09:27:47