Re: Finding next recored in a array
| From: | tedd | Date: | Mon, 17 Sep 2007 13:33:15 +0000 |
| Subject: | Re: Finding next recored in a array | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262164@lists.php.net to get a copy of this message | ||
Richard Kurth wrote:
$Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that that is the current number so I can select the next recordWhat the next record? Try: $array = array('0','1','3','5','8','15','25'); $val = "5"; echo($array[array_search($val, $array)+1]); Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com