Re: 2 ifs embedded?
| From: | m0s | Date: | Fri, 31 Jul 2009 13:58:19 +0000 |
| Subject: | Re: 2 ifs embedded? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296109@lists.php.net to get a copy of this message | ||
Miller, Terion wrote:
> I need this to say : If row notes is not empty and is alpha echo notes
>
> How do I get the is alpha part in here;
>
> If (!empty($row['notes'])) {
>
>
> echo(" $trimNotes ");
>
> }
>
> I tried.....
>
> If (IsAlpha($row['notes'])) {
>
>
> echo(" $trimNotes ");
>
> }
>
> But it broke the whole script.
>
> --Terion
>
>
>
You can write it in one IF statement
If (!empty($row['notes']) && IsAlpha($row['notes'])) {
}