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

From: Date: Mon, 09 Oct 2000 06:27:52 +0000
Subject: Odp: [PHP-WIN] How to compare variable to string contains "$" ???
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3051@lists.php.net to get a copy of this message
Thanks a lot John!!!! This way does! Single quotas, \ or double $ doesn't :-( ??? ----- Original Message ----- From: Asendorf, John <JAsendorf@lcounty.com> To: Mariusz Topczewski <Mariusz.Topczewski@bianet.com.pl>; Php-Windows (E-mail) <php-windows@lists.php.net> Sent: Friday, October 06, 2000 3:45 PM Subject: RE: [PHP-WIN] How to compare variable to string contains "$" ??? > Give this a try: > > > > <?PHP > file://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 > > > > -- > 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 (#3051) next »