This can also be done with double pipes, which is what is used in many
other languages.
-
if($audio=="Cool" || $audio=="junk" || $audio=="Funky"){
Do this
} else{
Do this
}
--
As far as I can tell there are no plans to remove or reaso
> > This work fine, however, I would like to add to the criteria above. I would
> > like to say:
> >
> > if ($audio == "Cool" or "junk" or "funky"){
> >
> > ...
> >
>
> if (in_array($audio,array("Cool","junk","funky"))) {
> ...
> }
>
Yes that's one way but to answer the question:
if ($a ==
> This work fine, however, I would like to add to the criteria above. I would
> like to say:
>
> if ($audio == "Cool" or "junk" or "funky"){
>
> ...
>
if (in_array($audio,array("Cool","junk","funky"))) {
...
}
not the most elegant looking but it gets the job done.
/josh w
--
PHP General Ma
Hi,
Friday, March 25, 2005, 11:27:30 AM, you wrote:
MD> Hello,
MD> I would like to first thank everyone for their help with the last few
MD> questions I have had. I really appreciate it.
MD> Here is my question:
MD> if ($audio == "Cool"){
MD> Do this
MD> }else{
MD> Do that
MD> }
MD> This
Hello,
I would like to first thank everyone for their help with the last few
questions I have had. I really appreciate it.
Here is my question:
if ($audio == "Cool"){
Do this
}else{
Do that
}
This work fine, however, I would like to add to the criteria above. I would
like to say:
if ($au
5 matches
Mail list logo