note 106266 added to function.str-repeat

From: Date: Sun, 23 Oct 2011 11:51:03 +0000
Subject: note 106266 added to function.str-repeat
Groups: php.notes 
Request: Send a blank email to php-notes+get-184074@lists.php.net to get a copy of this message
hi guys , i've faced this example : <?php $my_head = str_repeat("°~", 35); echo $my_head; ?> so , the length should be 35x2 = 70 !!! if we echo it : <?php $my_head = str_repeat("°~", 35); echo strlen($my_head); // 105 echo mb_strlen($my_head); // 70 ?> be carefull with characters and try to use mb_* package to make sure everything goes well ... ---- Server IP: 69.147.83.197 Probable Submitter: 134.96.48.222 ---- Manual Page -- http://www.php.net/manual/en/function.str-repeat.php Edit -- https://master.php.net/note/edit/106266 Del: integrated -- https://master.php.net/note/delete/106266/integrated Del: useless -- https://master.php.net/note/delete/106266/useless Del: bad code -- https://master.php.net/note/delete/106266/bad+code Del: spam -- https://master.php.net/note/delete/106266/spam Del: non-english -- https://master.php.net/note/delete/106266/non-english Del: in docs -- https://master.php.net/note/delete/106266/in+docs Del: other reasons-- https://master.php.net/note/delete/106266 Reject -- https://master.php.net/note/reject/106266 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184074) next »