Re: What would JavaScript's CharAt() be in PHP?
| From: | Stefan Neufeind | Date: | Sat, 10 Apr 2004 11:35:44 +0000 |
| Subject: | Re: What would JavaScript's CharAt() be in PHP? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11767@lists.php.net to get a copy of this message | ||
On 9 Apr 2004 at 10:28, Scott Fletcher wrote:
> What would JavaScript's CharAt() be in PHP?
$a = "Hello";
echo $a[1]; => e
also note
echo substr($a, 1, 3); => ell
Though this is a non PEAR-related question :-)
Hope this helps
Stefan