tedd wrote:
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 record


What the next record?

Try:

    $array = array('0','1','3','5','8','15','25');
    $val = "5";

    echo($array[array_search($val, $array)+1]);

Cheers,

tedd

Not quite:

$array = array('0','1','3','5','8','15','25');
$val = "25";

echo($array[array_search($val, $array)+1]);

Notice: Undefined offset: 7 ...

brian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to