下面的代码,
$test_array = array("a","b","c","d","e");
echo "<fieldset><pre>";
htmlspecialchars(print_r($test_array));
echo "</pre></fieldset>";
这给出了类似的输出,
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
)
我想从索引 2 中删除特定条目并重新索引数组,如下所示,
Array
(
[0] => a
[1] => b
[2] => d
[3] => e
)
怎么做?