Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    substracting from arrays

    i was looking through the array functions in php.net and i saw NOTHING on deleting a value from an array, i must be wrong here but isn't that like one of the most common array functions people use?
    how can it not be there. I had to write my own function which simply reconstructed the array with the bad value out. I know there's a better way to do this.

  • #2
    Regular Coder dswimboy's Avatar
    Join Date
    Nov 2003
    Location
    mostly in Ann Arbor
    Posts
    458
    Thanks
    0
    Thanked 0 Times in 0 Posts
    check out the unset function in combination with the array_search function.
    "There is more than one way to do it."


  •  

    Posting Permissions

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