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!
I'm wondering if anyone could suggest a solution to a problem i'm having. In a mysql db, i have a longtext datatype field with data such as:
"07/15/2008 this is a test 07/14/2008 this is a second test"
When I display the data on a page using the coding below, the text appears in a single line. I need a line break to occur before each date within the History field. Is this possible? Any help would be appreciated. Thanks.
"07/15/2008 this is a test 07/14/2008 this is a second test"
any reason to store the information in that way?... seems that you are trying to store several "records" in just one field.... no good at all... every date/message should be a different record in your table history
its stored like that because it was imported from another db type into mysql and the line breaks were omitted, so i need to force a line break before each date using php. i would have imported the data into two fields, date and history, but it was no possible to separate the data during the import process.