I have a mail thing and I'm wondering how in every line you insert > at the first char. then the rest of the line. What is a code/URL to get it? [I have typed this in other message boards and they never responded.]
Split the orginal message up into an array of lines: $msgArray=explode('\r\n',$msg);
Prepend the '>': for ($x=0;$x<count($msgArray);$x++) $msgArray[$x]="> ".$msgArray[$x];
Turn the array back into a string: $msg=implode('\r\n',$msg);
That's more or less how I did it anyway.
HTH
Print one '>' sign, then replace each newline with a newline + '>' inside the string and print the string.
echo '>'; echo str_replace("\n", "\n>", $sString);
Yeah that would work. Bah, vincent, you're always coming out with better code than me! 🙂
I'll work out those 2 codes and see which one works better.
Hey, that's my job :-)