Thread: array pointer?
View Single Post
Old 12-07-2003, 10:24 PM   #5 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
you should not be using the internal array pointer for this. that is not what it is designed for, and some operations may modify it unexpectedly.

use indexes, like sde suggested.

PHP Code:
<?
$position 
array_search($pic,$imageArray);

// get the next pic
$position++;
$next_pic $imageArray[$position];
?>
if your arrays are hashed (key-based), use the each() function or similar.
joe_bruin is offline   Reply With Quote