php - How can I access multidimentional associative array? -
this question has answer here:
- get value array 2 answers
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
Post a Comment