Sleeper Posted November 4, 2011 Share Posted November 4, 2011 I have an issue with the below code if ($gtype == "%24L" || $gtype == "$L") The value actually starts with the dollar sign then L, but its being read as a variable that's not assigned so it showing as blank. so the question is how to I get to check and see if the value of gtype actually is $L in a way that it wont read $L as a variable and as a value instead? Link to comment https://forums.phpfreaks.com/topic/250420-value-question/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 4, 2011 Share Posted November 4, 2011 Either escape the $ "\$L" or use single quotes - '$L' Link to comment https://forums.phpfreaks.com/topic/250420-value-question/#findComment-1284834 Share on other sites More sharing options...
Sleeper Posted November 4, 2011 Author Share Posted November 4, 2011 Well now I know I should just get some sleep. The escape is beginners mentality. I call brain fart..lol. Thanks. Now that its fixed im going to sleep..lol Link to comment https://forums.phpfreaks.com/topic/250420-value-question/#findComment-1284835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.