how do I switch text to > at the beginning of a line, example:
texttexttext texttexttext Would be:
texttexttext texttexttext
how do I get the code for that?
With all text in string $text: $text = ">".ereg_replace("\n", "\n>", $text);
With all text in file $file: $lines = file($file); foreach ($lines as $idx => $line) $lines[$idx] = ">".$line;
I can get your code to work! <?php if($reply) { $msg = ">".ereg_replace("\n", "\n>", $msg); echo $msg; } ?> That's what I'm trying to do.
Ok, it works. And the question (mentioned in subject) is?
I'm saying that the string "msg=test" doesn't show the text "> test". Why? have you tested it?
Please explain again: do you want to add ">" at the beginning of each line (that's what my code does) or what?