That happens when an associative array contains a value without key in PHP
<?php
$assonum = ['key1' => 'a', 'b', 'key2' => 'c', 'd'];
echo $assonum['key1']; // outputs a
echo $assonum['key2']; // outputs c
echo $assonum[0]; // outputs b
echo $assonum[1]; // outputs d
?>
$assonum = ['key1' => 'a', 'b', 'key2' => 'c', 'd'];
echo $assonum['key1']; // outputs a
echo $assonum['key2']; // outputs c
echo $assonum[0]; // outputs b
echo $assonum[1]; // outputs d
?>
Comments
Post a Comment