BR
asked on
how to select BLOB or large text from mySql database to keep break lines?
Dear Experts,
I use php and mysql.
I create an announcements page, I list here the announcements.
First I insert the announcements into my database as BLOB. Everything is fine until this part.
I check the database and BLOB ( the text ) is the same as I entered it. ( the text has the break lines )
However when I select it from my database with below code, it is comes without break lines.
What do you suggest I should do? I need the show the text on my page properly, with break lines.
Thank you
I use php and mysql.
I create an announcements page, I list here the announcements.
First I insert the announcements into my database as BLOB. Everything is fine until this part.
I check the database and BLOB ( the text ) is the same as I entered it. ( the text has the break lines )
However when I select it from my database with below code, it is comes without break lines.
What do you suggest I should do? I need the show the text on my page properly, with break lines.
Thank you
$sql = "SELECT * FROM announcements";
$result = $mysqli->query($sql);
$num = $result->num_rows;
if ($num > 0) {
while($row = $result->fetch_assoc()) {
$announcements= $row["announcements"];
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER