note 15083 added to function.end.php

From: Date: Mon, 27 Aug 2001 15:56:40 +0000
Subject: note 15083 added to function.end.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-17213@lists.php.net to get a copy of this message
end comes in handy when dealing with arrays with gapped keys in loops.. ie: while($i < end(array_keys($items))){ echo $items[$i]; } since the array $items(0=>"hi", 4=>"hello"); makes the same loop using count($items) unreliable http://www.php.net/manual/en/function.end.php

« previous php.notes (#17213) next »