note 55405 added to function.mb-substr

From: Date: Tue, 02 Aug 2005 15:33:36 +0000
Subject: note 55405 added to function.mb-substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-92957@lists.php.net to get a copy of this message
Thanks Darien from /freenode #php for the following example (a little bit changed). It just prints the 6th character of $string. You can replace the digits by the same in japanese, chinese or whatever language to make a test, it works perfect. <?php mb_internal_encoding("UTF-8"); $string = "0123456789"; $mystring = mb_substr($string,5,1); echo $mystring; ?> (I couldn't replace 0123456789 by chinese numbers for example here, because it's automatically converted into latin digits on this website, look : &#38646;&#19968;&#20108;&#19977;&#22235; &#20116;&#20845;&#19971;&#20843;&#20061;) gilv ---- Manual Page -- http://www.php.net/manual/en/function.mb-substr.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55405 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55405&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55405&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92957) next »