I am getting a multidimensional array from an HTML form. When I want to get a single value, e.g.
$chapters = $_POST["chapters"];
echo $chapters[0]["title"];
it says undefined index title.
When I print the array, it shows as
Array
(
[chapters] => Array
(
[0] => Array
(
['title'] => this is title
['text'] => this is text
['photo'] => this is photo source
['photo_caption'] => photo caption
)
)
)
$_POSTor$chapters? (b) If this is the exact output, why are the string keys one time in quotes (e.g.['title']) and the other time without quotes ([chapters]) ?print_rnever prints string keys with quotes, so you must have manipulated the output.