Re: Looking at individual chars of string
| From: | Erik Price | Date: | Mon, 17 Mar 2003 19:10:25 +0000 |
| Subject: | Re: Looking at individual chars of string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140005@lists.php.net to get a copy of this message | ||
Bix wrote:
Is it possible to look at individual chars of a string? eg: $str = "12345"; print $str_1 // Gives "1" print $str_2 // Gives "2"Try this: print $str{0}; // gives "1" print $str{1}; // gives "2" Erik