php - How can I access multidimentional associative array? -


this question has answer here:

i have array return database query. i'm not sure how can retrieve value [url]?

please advice. thanks.

array ( [1] => array ( [0] => array ( [url] => '' [poster] => '' [skin] => siteorigin [ratio] => 1.777 [autoplay] => 0 [info] => array ( [grid] => 0 [cell] => 0 [id] => 0 [class] => '' ) ) [1] => array ( [title] => [text] => '' [filter] => 1 [info] => array ( [grid] => 1 [cell] => 0 [id] => 1 [class] => wp_widget_text ) ) ) 

this should work fine if you're legitimately trying value particular array:

$arr[1][0]['url'] 

multidimensional arrays arrays within arrays, each bracket operator yields new array can additional dereferenced until value want.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -