Re: Multiple variables
| From: | Thalis A. Kalfigopoulos | Date: | Tue, 28 May 2002 19:27:00 +0000 |
| Subject: | Re: Multiple variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99546@lists.php.net to get a copy of this message | ||
From my understanding of what you wrote:
foreach($textBoxArray as $tBox=>$tVal){
if(empty($tVal)){
echo("Found empty textBox: $tBox<br>\n");
}
}
Read in manual about isset() and empty()
cheers,
thalis
On Tue, 28 May 2002, Morten Nielsen wrote:
> Hi,
> I got a table, which contains a lot of text-boxes. Each textbox has a name:
>
> Text1
> Text2
> Text3
> etc.
>
> Is it possible to check if they are all set using a for-loop?
> I think of something like:
>
> for($i=1;$i<10;$i++)
> {
> if(empty("Text"+$i))
> {
> do something...
> }
> }
>
> regards,
> Morten
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>