note 92036 deleted from function.pos by danbrown
| From: | danbrown@php.net | Date: | Mon, 06 Jul 2009 16:23:35 +0000 |
| Subject: | note 92036 deleted from function.pos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157974@lists.php.net to get a copy of this message | ||
Note Submitter: cyberclone55 at gmail dot com
----
<?php
$array = array("val1","val2","val3");
$first = pos($array);
$first2 = current($array);
# In each loop we increase the index of the two variables
while($first === $first2 && !is_null($first))
{
$first = next($array);
$first2 = next($array);
}
$first != $first2 or echo("Equals");
?>