note 61146 deleted from function.trim by mazzanet
| From: | mazzanet@php.net | Date: | Thu, 20 Aug 2009 14:26:02 +0000 |
| Subject: | note 61146 deleted from function.trim by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159703@lists.php.net to get a copy of this message | ||
Note Submitter: jonathan at abbett dot org
----
With all this talk about trimming array values, it should be known that accidentally using the
trim() function with an array() argument ...
<?php
$array = array(1, 2, 3);
$array = trim($array);
print_r($array); // prints "Array"
echo($array); // also prints "Array"
?>
... yields the string "Array"