Re: Fw: [PHP] Looking at individual chars of string

2003-03-17 Thread zerof
Try: "; echo "So, echo \$vlr16200{0};returns the FIRST character of \"$vlr16200\", or, \"$vlr16201\"."; echo "and, echo \$vlr16200{9};returns TENTH, character of \"$vlr16200\", ou seja, \"$vlr16202\"."; ?> -- zerof -- PHP General Mailing List (http://www.php.net/) To

Re: Fw: [PHP] Looking at individual chars of string

2003-03-17 Thread Bix
Much appreciated! "Erik Price" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Kevin Stone wrote: > > > Actually as far as the computer knows strings *are* arrays. Access any > > character within a string in the same mannor as you would access an element > > in an array. For ex

Re: Fw: [PHP] Looking at individual chars of string

2003-03-17 Thread Erik Price
Kevin Stone wrote: Actually as far as the computer knows strings *are* arrays. Access any character within a string in the same mannor as you would access an element in an array. For example: $str = "hello world"; echo $str[4]; // prints o echo $str[6]; // prints w That works but is deprecated

Fw: [PHP] Looking at individual chars of string

2003-03-17 Thread Kevin Stone
- Original Message - From: "Bix" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 17, 2003 12:04 PM Subject: [PHP] Looking at individual chars of string > Is it possible to look at individual chars of a string? > > eg: $str = "12345"; > > print $str_1 // Gives "1" > print