Thanks Chris... added the extra = and its working fine... Have a nice day everyone!!!! Matt ----- Original Message ----- From: "Chris" <dmagick@xxxxxxxxx> To: "Matthew Ferry" <mferry@xxxxxxxxxxxxxxxxxxxx> Cc: <php-db@xxxxxxxxxxxxx> Sent: Tuesday, February 13, 2007 11:53 PM Subject: Re: IF statement in WHILE statement > 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/ > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php