It that BR is at very very beginning of string then use this
$x = preg_replace("/^
/i","\n",$x);
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Course Queries 4 Answers
manpreet
Best Answer
2 years ago
Ok, I am using a PHP editing form (previous person built) that submits data into an MSSQL database this works fine however when the information is submitted into the database and later retrieved the the form page (for editing) there is a
at the beginning of the text. If the fields start with a
that
is not inserted. I have been trying to figure out how to stop this. One thing I tried ends up removing all
in the text which makes the formatting disappear, How can I keep it from inserting the
at the top but keeping the
everywhere else? here is the code I have: ( I am giving you everything up to the first field where I have the issue appear)