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

From: Date: Mon, 17 Mar 2003 19:20:58 +0000
Subject: Re: Fw: [PHP] Looking at individual chars of string
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-140011@lists.php.net to get a copy of this message
Much appreciated! "Erik Price" <eprice@ptc.com> wrote in message news:3E761E9A.1040601@ptc.com... > > > 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. Use curlies. > > http://www.php.net/manual/en/language.types.string.php#language.types.string .substr > > > > Erik >

« previous php.general (#140011) next »