note 31855 deleted from function.implode by alindeman

From: Date: Tue, 06 May 2003 20:40:51 +0000
Subject: note 31855 deleted from function.implode by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-47600@lists.php.net to get a copy of this message
This will fail because $goodvals is commented out. /* $goodvals[] = "1"; $goodvals[] = "7"; $goodvals[] = "12"; */ $string = implode(",", $goodvals); One fix is to make sure that the array has values in it with an if-block: /* $goodvals[] = "1"; $goodvals[] = "7"; $goodvals[] = "12"; */ if ($goodvals) { $string = implode(",", $goodvals); }

« previous php.notes (#47600) next »