SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: empty array?

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    empty array?

    Is there a way to determine if a particular part of an element is empty. Lets say for this exsample, $array[3] has nothing in it.. How can I find that out?

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's simple.

    if (!$array[3])
    {
    echo "empty";
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •