From: Dan McCullough <[EMAIL PROTECTED]>
Date: Fri, Oct 26, 2001 at 06:03:00AM -0700
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] String breaking up
> I was looking to take a string like Dan and return it like
> D
> A
> N
>
> is it the str function that does th
This only returns the first letter?
--- _lallous <[EMAIL PROTECTED]> wrote:
> $string = "hey there!";
>
> $out = '';
> for ($i=0; $i$out .= strtoupper($string[$i]) . "\n"; // or if output is to
> browser
> }
> echo $out;
>
> "Richard Baskett" <[EMAIL PROTECTED]> wrote in message
> [EMAIL
$string = "hey there!";
$out = '';
for ($i=0; $i if output is to
browser
}
echo $out;
"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Strings are arrays, so you can print out a string by doing something like
> this:
>
> $string = "hey ther
> Strings are arrays, so you can print out a string by doing something like
> this:
Yups, this is possible, but i think he wants to have a newline for each
character,
you can doe this excelent with a small addition to your example:
> $string = "hey there!";
>
> for ($i=0; $i echo strtoupper($st
To be more precise add the at the end of the line between the for loop:
Strings are arrays, so you can print out a string by doing something like
this:
$string = "hey there!";
for ($i=0; $i';
}
That's about all there is to it! :) Use the strtoupper() function if you
mean to have everything u
Strings are arrays, so you can print out a string by doing something like
this:
$string = "hey there!";
for ($i=0; $i I was looking to take a string like Dan and return it like
> D
> A
> N
>
> is it the str function that does that
>
> =
> Dan McCullough
> --
I was looking to take a string like Dan and return it like
D
A
N
is it the str function that does that
=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Famil
7 matches
Mail list logo