[PHP] Re: Ending PHP

2005-03-25 Thread Gerhard Pfeiffer
* Marquez Design <[EMAIL PROTECTED]>: > I have an if statement, and if it is true, I want PHP not to continue. > > How do I do this? if ($a == $b) { exit(); } http://de3.php.net/exit > The following statement is true > > If ($a = $b){ btw: Most of the times you will want to user == in a

[PHP] Re: reduce the following code "if ($colorVar == 'Black' || $colorVar == 'Red' || $colorVar == 'White' || $colorVar == 'Blue' ){"

2005-03-23 Thread Gerhard Pfeiffer
* Lupita <[EMAIL PROTECTED]>: > Can any one show me a way to reduce the following code? > [...] > I was thinking there must be a way to place all the Colors into a > $allColorVar and check to see if $colorVar = $allColorVar? I think http://de3.php.net/manual/en/function.in-array.php is what you w