Hey. Lets say i have a string...$string... How can i replace each individual letter of $string with the following: "Letter is [letter]" where [letter] is the corrosponding letter. I was thinking about putting each letter into an array and using a foreach loop, but i dont know how to split the string up Thanks in advance, Dan.
a string is automatically a array of letters so you can just do the following.. $string="blah blah"; $x=0; while ($string[$x]!="") { echo "$x: Letter is $string[$x]<br>"; ++$x; } PHP: