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
    Sep 2011
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts

    checking if an array value is set

    Hi,

    I have a piece of code that grabs some ip information from a lookup and then places it in to my mysql database.

    Now what i want to do is only add information where the descr field is set, for example

    PHP Code:
    $address implode(", ", (array) $ip['address']);
    $descr implode(", ", (array) $ip['descr']);
    $phone implode(", ", (array) $ip['phone']); 
    is their a way that i can see if the descr field in the above array is containing a value, i know i can do this with a variable but have no idea if it is possible from an array.

    Thanks

  • #2
    New Coder
    Join Date
    Sep 2011
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts
    SOlved

    PHP Code:

    if(isset($descr)){ 


  •  

    Posting Permissions

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