CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   checking if an array value is set (http://www.codingforums.com/showthread.php?t=252158)

leest 02-21-2012 08:22 AM

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

leest 02-21-2012 08:48 AM

SOlved

PHP Code:


if(isset($descr)){ 



All times are GMT +1. The time now is 08:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.