Silas Silas - 1 year ago 42
SQL Question

PHP turn comma into a <br />

I'm not sure what this would be called, but I do know that php can turn a newline into a

<br />,

but is there a way that it can turn a comma "," into a

<br />.

For instance on an HTML page a user enters a bunch of words that are seperated by a comma. He then submits it, it sends to a PHP file like normal and instead of the data getting sent right into the DB it goes through some kind of function to replace the commas with

<br />

so if I were to show the data on an HTML page, each thing he entered in that was seprated by a comma is now seprated by a newline/line break?

I hope this makes sense and I explained it decently.


Answer Source