How to echo out the values of this array?
arrays, key, php
Solution
foreach ($array as $key => $val) {
echo $val;
}
Problem
How to echo out the values individually of this array? ``` Array ( [0] => 20120514 [1] => My Event 3 ) ``` so ``` echo $value[0]; etc ``` I have this so far: ``` foreach (json_decode($json_data_string, true) as $item) { $eventDate = trim($item['date']); // positive limit $myarray = (explode(',', $eventDate, 2)); foreach ($myarray as $value) { echo $value; } ``` This echo's out the whole string no as an array. and if i do this? ``` echo $value[0}; ``` Then I only get 2 characters of it?? The print_r : ``` Array ( [0] => 20120430 [1] => My Event 1 ) ```