[thelist] PHP Array loop help

Crous, Michelle Mcrous at thurrock.gov.uk
Fri May 10 07:32:01 CDT 2002


> while(list($key, $value) = each($cookieInfo)){
> if($v == $key){
> print "Link Info: $value\n<br>";
> }

You could also use a foreach loop instead of a while loop:

    foreach ($cookieInfo as $key => $value){
        if($v == $key){
	        print "Link Info: $value\n<br>";
        }
    }

Mac

The information in this e-Mail and any attachment(s) are intended to be
confidential and may be legally privileged. Access to and use of its
content by anyone else other than the addressee(s) may be unlawful and
will not be recognised by Thurrock Council for business purposes. Thurrock
Council cannot accept any responsibility for the accuracy or completeness
of this message as it has been transmitted over a public network.

Any opinions expressed in this document are those of the author and do
not necessarily reflect the opinions of Thurrock Council.

Any attachment(s) to this message has been checked for viruses, but please
rely on your own virus checker and procedures.

If you contact us by e-mail, we will store your name and address to
facilitate communications.
____________________________________________________________________
This message has been checked for all known viruses by the MessageLabs Virus Control Centre. For further information visit
http://www.messagelabs.com/stats.asp



More information about the thelist mailing list