How to get line breaker from blob field in mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Muhammad Omar
Forum Newbie
Posts: 4
Joined: Sat Jun 05, 2010 9:50 am

How to get line breaker from blob field in mysql

Post by Muhammad Omar »

My Question is "How to get line breaker from blob field in mysql using php."
in my database some fields are blob .
in these blobs i save many paragraphs in one field.
i am trying to show these fields in it's original style.
but i am failed to do that.
it shows all paragraph in one paragraph.
but i want to show separate paragraphs.
tell me how can i do this. soon
Last edited by Muhammad Omar on Wed Jun 23, 2010 4:32 pm, edited 4 times in total.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how to use line breaker in blob filed in mysql

Post by Benjamin »

Code: Select all

$lineBreaker = "\n";
:arrow: Moved to PHP - Code
Muhammad Omar
Forum Newbie
Posts: 4
Joined: Sat Jun 05, 2010 9:50 am

Re: how to use line breaker in blob filed in mysql

Post by Muhammad Omar »

Hi,
Sorry one thing i forget to mentioned data is already stored in db so i am just pulling from blob field one thing i note in SQLyoug i can see data properly showing but when i fetch it using php and echo on page it come without breaker.
Thanks for replying.
Muhammad Omar
Forum Newbie
Posts: 4
Joined: Sat Jun 05, 2010 9:50 am

Re: How to get line breaker from blob field in mysql

Post by Muhammad Omar »

Waiting for Reply.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to get line breaker from blob field in mysql

Post by Benjamin »

Code: Select all

$n = nl2br($y);
Post Reply