Answer the question
In order to leave comments, you need to log in
How to select value from multidimensional array?
Good afternoon, there is an array, I'm trying to select a value from the array inside the loop.
Something like this
$value[0][0]
But nothing happens, you need to get a string with the name at the output, for example director
array(4) { ["director"]=> string(27) "Джеймс Кэмерон" ["writer"]=> string(27) "Джеймс Кэмерон" ["producer"]=> string(73) "Джеймс Кэмерон, Джон Ландау, Брук Бретон" ["artist"]=> string(75) "Рик Картер, Роберт Стромберг, Ник Бассетт" }
Answer the question
In order to leave comments, you need to log in
echo $value['director']; // will display everything that is nested in it
echo $value['director'][0] // value of the first entry
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question