Re: [PHP] String to an Array

2002-12-07 Thread Rick Widmer
At 11:15 AM 12/8/02 +1100, Justin French wrote: I *think* either: OR Works -- you'll have to experiment, but I believe the second way is correct, and will echo the first (0th) character in the string. This depends on PHP version. In the bad old days you had to use $str[0]. Sometime sinc

Re: [PHP] String to an Array

2002-12-07 Thread Justin French
I *think* either: OR Works -- you'll have to experiment, but I believe the second way is correct, and will echo the first (0th) character in the string. If you want to get more than 1 character from a string (example, characters 2-5), then use substr() -- check out the manual. So far, I d

Re: [PHP] String to an Array

2002-12-06 Thread Jason Wong
On Saturday 07 December 2002 02:12, [EMAIL PROTECTED] wrote: > Hello, > > "Rodrigo de Oliveira Costa" <[EMAIL PROTECTED]> wrote: > > Hi guys, I got a string that I need to be transformed into na array of > > characters, something like: > > > > > > $str ="im the one trying to do this"; > > > >

Re: [PHP] String to an Array

2002-12-06 Thread @ Edwin
Hello, "Rodrigo de Oliveira Costa" <[EMAIL PROTECTED]> wrote: > Hi guys, I got a string that I need to be transformed into na array of > characters, something like: > > > $str ="im the one trying to do this"; > > //this is the string > > I'd like to get an array that I can access som

Re: [PHP] String to an Array

2002-12-06 Thread Matt Vos
A string is an array of characters. In your example, $str[4] == "h". Matt - Original Message - From: Rodrigo de Oliveira Costa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 1:50 PM Subject: [PHP] String to an Array > Hi guys, I got a string that I need to