Home >Backend Development >PHP Tutorial >What is the subscript of $tg['x']='b';?
$tg[]='q';
$tg['x']='b';
$tg[]='g';
? >
What is the subscript of $tg['x']='b';? Can it only be ‘x’? How is it arranged in the array?
$tg[]='q';
$tg['x']='b';
$tg[]='g';
? >
What is the subscript of $tg['x']='b';? Can it only be ‘x’? How is it arranged in the array?
<code class="shell">php > $tg[]='q'; php > $tg['x']='b'; php > $tg[]='g'; php > print_r($tg); Array ( [0] => q [x] => b [1] => g )</code>
The subscript is x, the second digit of the array
Didn’t you specify the subscript?