|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-05 12:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 06:00:02 2025 UTC |
<?php $fruits= array ("first", -1 => "second","third" ); ?> <?php echo $fruits[0] ?> // print first </p> <?php echo $fruits[-1];?> // print second </p> <?php echo $fruits[1];?> // Notice: Undefined offset: 1 </p> <?php echo count($fruits) ?> // print 2! What's the key for element "third"? why array's size is 2?