My code is...
$string ="foo:bar,bar,bar|foo2:bar2,bar2,bar2";
$first_array = explode("|", $string);
function split(&$block) {
$block = explode(":", $block);
}
array_walk($first_array, "split");
echo $block["0"]["0"];
echo "<br />";
echo $block["0"]["1"];
?>
Thank you for the help thus far. From what I've gathered this should be the clean version of the supplied code. This does not echo anything, and neither does the code supplied.
echo $result
will just spit out the wordArray
, not the array's contents. – Marc B yesterday<delim1>
and<delim2>
rather than?!#@^&$%@#
and&*%&@#*&^%
which you probably typed in manually and mistyped somewhere throwing it all off. – developerwjk yesterday$city_array
or$cityarray
... – developerwjk yesterday