note 82287 rejected from function.trim by felipe
| From: | felipe@php.net | Date: | Fri, 04 Apr 2008 10:50:15 +0000 |
| Subject: | note 82287 rejected from function.trim by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137921@lists.php.net to get a copy of this message | ||
Note Submitter: JH
----
I encountred a wierd bug with trim. The code was something like this:
<?php
// $array is a multidimenssional array
foreach($array as $val) {
$this->rules[trim($val[1])] .= $val[2];
}
?>
This however works perfectly well.
<?php
foreach($array as $val) {
$value = trim($val[1]);
$this->rules[$value] .= $val[2];
}
?>