note 89682 added to control-structures.foreach

From: Date: Thu, 19 Mar 2009 08:51:58 +0000
Subject: note 89682 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-152124@lists.php.net to get a copy of this message
Hi, this might be the wrong place to ask this but I really can't figure out how to do this. Currently i have a system that fixes my problem of having while statements running for longer than the max execution time on my shared hosting, so what I've done is, in the while statement added total++; and when total reaches a certain ammount then it refreshes file and adds a get variable current, and current is the total that it ended on before it refreshed, so that it starts at current. If that makes sense... But now i have numbers in a txt file separated by a space each, now I've got them out of the text file and stuck the numbers into an array, and I want to use the same concept as above, but I can't figure out how to tell php which number inside the array to start on since the numbers are something like: 1 2 16 22 32 33 34 45 50 so how can I do that? ---- Server IP: 64.71.164.2 Probable Submitter: 67.127.98.63 ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- https://master.php.net/note/edit/89682 Del: integrated -- https://master.php.net/note/delete/89682/integrated Del: useless -- https://master.php.net/note/delete/89682/useless Del: bad code -- https://master.php.net/note/delete/89682/bad+code Del: spam -- https://master.php.net/note/delete/89682/spam Del: non-english -- https://master.php.net/note/delete/89682/non-english Del: in docs -- https://master.php.net/note/delete/89682/in+docs Del: other reasons-- https://master.php.net/note/delete/89682 Reject -- https://master.php.net/note/reject/89682 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152124) next »