Quote:
Originally Posted by HLM
PHP Code:
if azarg2 = "on" then $dothis else if szarg2 ="off" then $turn_this_off else if szarg2 = "half" then $use_this
am I going about this correctly?
|
Emp already told you that you can't do it with strings. You can do following:
PHP Code:
switch( szarg2[ 1 ] )
{
case 'n': { }
case 'f': { }
case 'a': { }
}
Or
PHP Code:
if( equal( szarg2, "on" ) ) { }
else if( equal( szarg2, "off" ) ) { }
else if( equal( szarg2, "half" ) ) { }