note 77514 deleted from function.mb-substr by nlopess
| From: | nlopess@php.net | Date: | Sun, 02 Sep 2007 10:19:59 +0000 |
| Subject: | note 77514 deleted from function.mb-substr by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-130093@lists.php.net to get a copy of this message | ||
Note Submitter: Silvan
----
Passing null as length will not make mb_substr use it's default, instead it will interpret it
as 0.
<?php
mb_substr($str,$start,null,$encoding); //Returns '' (empty string) just like substr()
?>
Instead use:
<?php
mb_substr($str,$start,mb_strlen($str),$encoding);
?>