note 80116 deleted from language.oop5.magic by felipe

From: Date: Sun, 30 Dec 2007 21:40:24 +0000
Subject: note 80116 deleted from language.oop5.magic by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134549@lists.php.net to get a copy of this message
Note Submitter: daniel at fanetworks dot net ---- code that was posted below: <?php $str = ''; $values = array_values($var); for ( $i=0; $i<count($values); $i++ ) { $str .= "'".$values[$i]."' ,"; } ?> Would of been so much easier written as $var = "'".implode("', '",$var)."'"; If you really wanted to do it by eval that is instead of call_user_func_array

« previous php.notes (#134549) next »