RE: [PHP-WIN] How to compare variable to string contains "$" ???

From: Date: Fri, 06 Oct 2000 13:45:44 +0000
Subject: RE: [PHP-WIN] How to compare variable to string contains "$" ???
Groups: php.windows 
Request: Send a blank email to php-windows+get-3007@lists.php.net to get a copy of this message
Give this a try: <?PHP //doublecheck the correct input echo "here's the thing $table[$i][$j] "; if (ereg ( "$IN\_UZ" , $table[$i][$j] )) { echo "<br />works"; } else { echo "<br />nope"; } ?> --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 > -----Original Message----- > From: Mariusz Topczewski [mailto:Mariusz.Topczewski@bianet.com.pl] > Sent: Friday, October 06, 2000 8:47 AM > To: Php-Windows (E-mail) > Subject: Odp: [PHP-WIN] How to compare variable to string > contains "$" ??? > > > if ($table[$i][$j] == "\$IN_UZ" ) doesn't work :-( > > Could you help me? > > Mariusz > > > Have you tried a preceding slash? > > > > if ($table[$i][$j] == "\$IN_UZ" ) > > > > I'm not sure if it will work, but give it a try... > > > > you could also use a regex... if the first one doesn't > work, let me know > > and I'll put together one for you. > > > > John > > > > --------------------- > > John Asendorf - jasendorf@lcounty.com > > Web Applications Developer > > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > > Licking County, Ohio, USA > > 740-349-3631 > > > > > > > -----Original Message----- > > > From: Mariusz Topczewski [mailto:Mariusz.Topczewski@bianet.com.pl] > > > Sent: Friday, October 06, 2000 7:52 AM > > > To: php-windows@lists.php.net > > > Subject: [PHP-WIN] How to compare variable to string > contains "$" ??? > > > > > > > > > Hi, > > > > > > I would like check somthing like this: > > > > > > if ($table[$i][$j] == "$IN_UZ" ) $IN_UZ -> this is string > > > contains char > > > "$", not a variable > > > > > > Regards, > > > Mariusz > > > > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-windows-help@lists.php.net > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#3007) next »