php - Display data from multidimensional array -


this question has answer here:

how display individual values array?

for instance: x = 8.6; y = 43; f = more stuff?

$mega['stuff'] = [   8.6,   43,   'more stuff' ]; 

you make associative array key-value pair.

$mega['stuff'] = [   'x' => 8.6,   'y' => 43,   'f' => 'more stuff' ];  foreach ($mega['stuff'] $k => $v) {     echo $k . ' : '. $v;     echo '<br/>'; } 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -