Jump to content

Use PHP to pull data from TEXT in MySQL


justjay

Recommended Posts

It has been a while since I have had the chance to do any work in PHP so there are a lot of cobwebs. 

I am not sure what exactly to call what I am trying to do so it has been hard to try and successfully search for any assistance.

I have a field in my MySQL table that acts as a BIO about the people in the DB - the data in that TEXT field is displayed in paragraphs (no coding just raw text with line breaks).

How do I used PHP to pull that data so when it is displayed on the web page it includes the line breaks?

[b]EXAMPLE:[/b]

[b]Content of field in TABLE (text):[/b]

[quote]It has been a while since I have had the chance to do any work in PHP so there are a lot of cobwebs. 

I am not sure what exactly to call what I am trying to do so it has been hard to try and successfully search for any assistance.

I have a field in my MySQL table that acts as a BIO about the people in the DB - the data in that TEXT field is displayed in paragraphs (no coding just raw text with line breaks).

How do I used PHP to pull that data so when it is displayed on the web page it includes the line breaks?[/quote]

[b]Currently displaying like (using echo or print);[/b]

[quote]It has been a while since I have had the chance to do any work in PHP so there are a lot of cobwebs. I am not sure what exactly to call what I am trying to do so it has been hard to try and successfully search for any assistance. I have a field in my MySQL table that acts as a BIO about the people in the DB - the data in that TEXT field is displayed in paragraphs (no coding just raw text with line breaks). How do I used PHP to pull that data so when it is displayed on the web page it includes the line breaks?[/quote]

[b]Want it to look like:[/b]

[quote]It has been a while since I have had the chance to do any work in PHP so there are a lot of cobwebs. 

I am not sure what exactly to call what I am trying to do so it has been hard to try and successfully search for any assistance.

I have a field in my MySQL table that acts as a BIO about the people in the DB - the data in that TEXT field is displayed in paragraphs (no coding just raw text with line breaks).

How do I used PHP to pull that data so when it is displayed on the web page it includes the line breaks?[/quote]

Hope someone can help me with this headache!

Thanks,

Jay
Link to comment
https://forums.phpfreaks.com/topic/33611-use-php-to-pull-data-from-text-in-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.