Re: IF statement in WHILE statement

From: Date: Wed, 14 Feb 2007 04:53:18 +0000
Subject: Re: IF statement in WHILE statement
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43077@lists.php.net to get a copy of this message
Matthew Ferry wrote:
Hello Everyone, Got another simple problem here.... I am trying to do a if statement inside a while (mysql_fetch_array) Here is my code: if ($link = mysql_tech_array($links)) { do { if ($_GET['page'] = "$link[file]") {
You're assigning $_GET['page'] to whatever is in $link['file']. It should be '==' not '=' to do a comparison. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#43077) next »