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
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
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";
> >
> >
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
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
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 something like $array[0] and
get the value " i ". And this foward. Anyone have any cl
6 matches
Mail list logo