I am trying to decode an array of objects that I made in javascript and sent to php however, I cant seem to decode it correctly. The array with an object looks like this:
the php code that I am using to get the information is this:
$allInformation = $_POST['information'];
//this works
$user = $allInformation[count($allInformation)-2];
$num = $allInformation = [count($allInformation)-1];
//this doesnt work
$array = var_dump(json_decode($allInformation));
The index of array 1 and 2 work just fine, however, I cant seem to decode index 0 which is the object. How may I go about this?