Re: Has element of array been initialized?
| From: | Rob Adams | Date: | Tue, 08 Apr 2003 23:19:47 +0000 |
| Subject: | Re: Has element of array been initialized? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142972@lists.php.net to get a copy of this message | ||
"Ben Edwards" <ben@videonetwork.org> wrote in message
news:5.1.1.6.2.20030408235826.0344e170@mail.videonetwork.org...
> I am trying to see if elements of a number indexed array are set, i.e.
> something like:-
>
> if ( isset( $seq[$index]) ) {
> echo $seq[$index]."<br>";
> }
The only error I get when running this is when $index is undefined. I can
call
isset($seq[whatever number you please here])
without getting an error.
>
> Except in this case isset gives an error. How do i 'ask' if the element
> has been initialized?
>
> Ben
>
>
> ****************************************************************
> * Ben Edwards Tel +44 (0)117 968 2602 ICQ 42000477 *
> * Critical Site Builder http://www.criticaldistribution.com
> *
> * online collaborative web authoring content management system *
> * Get alt news/views films online http://www.cultureshop.org
> *
> * i-Contact Progressive Video http://www.videonetwork.org
> *
> * Fun corporate graphics http://www.subvertise.org
> *
> * Bristol Indymedia http://bristol.indymedia.org
> *
> * Bristol's radical news ü¯lÀQý/¾
> ±H®Ù *
> ****************************************************************
>
----------------------------------------------------------------------------
----
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.465 / Virus Database: 263 - Release Date: 25/03/2003
>