$tg[]=’q’;
$tg[‘x’]=’b’;
$tg[]=’g’;
?>
$tg[‘x’]=’b’;的下标是多少?只能是‘x’吗?那它在数组中怎么排?
回复内容:
<?php
$tg[]=’q’;
$tg[‘x’]=’b’;
$tg[]=’g’;
?>
$tg[‘x’]=’b’;的下标是多少?只能是‘x’吗?那它在数组中怎么排?
来&源gao@dai!ma.com搞$代^码%网搞gaodaima代码
<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>
下标就是x,数组第二位
你不是指定下标了么,