Bug #15329: Subscripting into strings would be useful

From: Date: Fri, 01 Feb 2002 18:48:18 +0000
Subject: Bug #15329: Subscripting into strings would be useful
Groups: php.dev 
Request: Send a blank email to php-dev+get-78791@lists.php.net to get a copy of this message
From: hek@loudoun-net.com Operating system: N/A PHP version: 4.1.1 PHP Bug Type: Feature/Change Request Bug description: Subscripting into strings would be useful The now very old North Star BASIC had a wonderful feature that I'd love to see in PHP, which was the ability to access strings using subscripts, rather like subscripting into an array, except even better since it allowed ranges to be subscripted just as easily as single characters in the strings. Examples: $string = "My String"; echo $string[5]; // returns "r" echo $string[0,]; // returns "My String" echo $string[3,5]; // returns "Str" echo $string[,3]; // returns "My S" -- Edit bug report at: http://bugs.php.net/?id=15329&edit=1

« previous php.dev (#78791) next »