www.webdeveloper.com
Results 1 to 3 of 3

Thread: unset in JS?

  1. #1
    Join Date
    Sep 2009
    Posts
    146

    unset in JS?

    I am running through an array and need to unset given values, but i cant seem to find the php equivalent to php's unset?

    there is:
    Code:
    delete array['key']
    but that still leaves the array element just with a value of undefined. It erases the key, but it still remains in the array. so when i then run through the array using jQuery's $.each it still loops for those undefined elements...

    anyone know of a true unset?

    Thanks,
    -aPeg

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    splice then join
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Sep 2009
    Posts
    146
    Not the cleanest, but gets the job done... Thanks Fang

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles