...

View Full Version : checking if an array value is set



leest
02-21-2012, 09:22 AM
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



$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

leest
02-21-2012, 09:48 AM
SOlved




if(isset($descr)){



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum