How do I replace a whole line?
If a line contains: "http"
I want the whole line to be substitued with "Censored"?
Well, assuming you find the "http", I would think blocking off from that point to the first "space" would give you the block you want to censor....There's gotta be an easier way though.
would be great to block till the first carriage return.. how would i do that?
Think about it: what if there's only one carriage return? You'd take out the whole paragraph! Trust me, to the space and the site is censored. (sub space for \n if you're adamant).
ereg ("http"\n,
hmm not too sure bout this either..
is this right?
$test = str_replace("http"|"\n", "No Urls Allowed", $text);
remember..if http is there, i want the whole line to be taken out and put No Urls Allowed.
Thanks