Strings and Arrays
| From: | Derick Schuetz | Date: | Thu, 13 Jul 2000 16:35:47 +0000 |
| Subject: | Strings and Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6491@lists.php.net to get a copy of this message | ||
I read somewhere in the annotated manual that strings are character arrays.
I am very unfamiliar with the use of arrays in PHP, so I am wondering if
someone could throw me a quick pointer or two. I want to print a modified
block of html code for each letter in a string. So if I create a function
that can be passed the string itself, how would I print out the block of
code for each individual letter in the array? This is the code I tried to
use, but it did not work:
function unnamed( $word ) {
GLOBAL $val;
reset ( $word );
while (list ($val) = each ($word)) {
echo "HTML CODE FOR EACH LETTER";
}
Thanks!
Derick Schuetz
dschuetz@ausam.com