I'm using the following code to enter text into a DB.
It is sometimes dropping words or adding line breaks.
Is there a better, more effiecient way to do this?
Code: Select all
$otherDetail = ereg_replace("[^[:space:]a-zA-Z0-9*_.-]", "", $otherDetail);
$otherDetail = ereg_replace("[ \t\r\n]+", " ", $otherDetail);