note 81118 deleted from function.explode by tularis

From: Date: Mon, 27 Oct 2008 13:04:06 +0000
Subject: note 81118 deleted from function.explode by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145813@lists.php.net to get a copy of this message
Note Submitter: Benjamin ---- This function explodes a string and trims all elements function explode_and_trim($separator, $text, $trim_chars = false, $limit = false) { if ($limit === false) $arr = explode($separator, $text); else $arr = explode($separator, $text, $limit); $ret = array(); foreach($arr as $e) { if ($trim_chars === false) $ret[] = trim($e); else $ret[] = trim($e, $trim_chars); } return $ret; }

« previous php.notes (#145813) next »