|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello, newbie looking for some please
In the following do I have to use two if else structures or can I use a boolean funtion in the 'if' because I want to check two variables not one. if ($found == 0) AND ($whatever == 0) { //Do it } else { //Do nothing } Paul |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mar 28, 12:50 pm, "PaulB" <pb...@ntlworld.com> wrote:
> Hello, newbie looking for some please > > In the following do I have to use two if else structures or can I use a > boolean funtion in the 'if' because I want to check two variables not one. > > if ($found == 0) AND ($whatever == 0) > { > //Do it} > > else > { > //Do nothing > > } > > Paul that?! if ($found == 0 && whatever == 0) { //do it } else { //do not do it } http://www.php.net/manual/en/language.operators.php |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
SrSilveira wrote:
> On Mar 28, 12:50 pm, "PaulB" <pb...@ntlworld.com> wrote: >> Hello, newbie looking for some please >> >> In the following do I have to use two if else structures or can I >> use a boolean funtion in the 'if' because I want to check two >> variables not one. >> >> if ($found == 0) AND ($whatever == 0) >> { >> //Do it} >> >> else >> { >> //Do nothing >> >> } >> >> Paul > that?! > > if ($found == 0 && whatever == 0) > { > //do it > } > else > { > //do not do it > } > http://www.php.net/manual/en/language.operators.php Thank you. |
|
![]() |
| Outils de la discussion | |
|
|