Raised This Month: $ Target: $400
 0% 

client_print cmd_target problems...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-25-2009 , 16:41   Re: make a case of a switch equal a string?
Reply With Quote #5

Quote:
Originally Posted by HLM View Post
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] )
{
     case 
'n': { }
     case 
'f': { }
     case 
'a': { }

Or
PHP Code:
if( equalszarg2"on" ) ) { }
else if( 
equalszarg2"off" ) ) { }
else if( 
equalszarg2"half" ) ) { } 
SnoW is offline
Send a message via MSN to SnoW
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode