How to echo values individually from this array?
Array ( [0] => 20120514 [1] => My Event 3 )
So
echo $value[0]; etc
I still have this:
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 prints the entire string no as an array. and if i do this?
echo $value[0};
Then I get only 2 characters?
EDIT:
Print_r:
Array ([0] => 20120430 [1] => My event 1)
thanks
Chris
source share