note 31320 added to function.preg-split

From: Date: Thu, 17 Apr 2003 11:02:38 +0000
Subject: note 31320 added to function.preg-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-46728@lists.php.net to get a copy of this message
String datatype is already an array of characters: $str = "blablabla"; $chr = $str[0]; echo $chr; above piece of code will produce: 'b', but documentation says that: "Characters within strings may be accessed by specifying the zero-based offset of the desired character after the string in curly braces... ...For backwards compatibility, you can still use array-braces for the same purpose. However, this syntax is deprecated as of PHP 4. " so using '{}' instead of '[]' is better. -- http://www.php.net/manual/en/function.preg-split.php http://master.php.net/manage/user-notes.php?action=edit+31320 http://master.php.net/manage/user-notes.php?action=delete+31320 http://master.php.net/manage/user-notes.php?action=reject+31320

« previous php.notes (#46728) next »