[Solved] How to get value of array inside another array in php?

[ad_1]

To echo:

echo $_POST['events'][0];

To assign it to a variable:

$eventid = $_POST['events'][0];

To assign the array to a variable and get the value from the new array:

$events = $_POST['events'];
$eventid = $events[0];

[0] represents the key of the first value since it is set to be 0.

4

[ad_2]

solved How to get value of array inside another array in php?