Bug #18307 Updated: Using next () && prev() on session array

From: Date: Fri, 12 Jul 2002 12:10:40 +0000
Subject: Bug #18307 Updated: Using next () && prev() on session array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13971@lists.php.net to get a copy of this message
ID: 18307 Updated by: derick@php.net Reported By: submiturl@vaner.com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: WinXP PHP Version: 4.1.2 New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2002-07-12 08:08:44] submiturl@vaner.com i was using PHP 4.1.2 ------------------------------------------------------------------------ [2002-07-12 07:57:02] submiturl@vaner.com I've tried to use next() and prev() on a array that was registerd with session. unfortunatelly it did not produce desired outcome. instead of traversing array fully it doesnt proceed after a second element. and when prev() is used the internal pointer gets stuffed so seach returns false. ----------------CODE--------- <? session_start(); if(!session_is_registered('session_array')){ session_register('session_array'); $session_array = Array(); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); $session_array []=count($session_array); print_r($session_array); } if(isset($programAction) && $programAction == "Next"){ next($session_array); } if(isset($programAction) && $programAction == "Prev"){ prev($session_array); } echo current($session_array); ?> <form name="form1" method="get" action="<?=$_SERVER['PHP_SELF']?>"> <input name="programAction" type="submit" id="programAction" value="Prev"> <input name="programAction" type="submit" id="programAction" value="Next"> </form> ----------------------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18307&edit=1

« previous php.bugs (#13971) next »