Reputation: 13
i have a column name fighters which include some value in mysql such as,
| fighters |
| Rock |
| John Cena, |
| UnderTaker,|
So, I want when i Display it in a browser it should appear like
Rock
John Cena
UnderTaker
I just want to remove commas from database using PHP
Any Help will be appreciated..
Upvotes: 0
Views: 980
Reputation: 3288
Use REPLACE() in the SQL query
SELECT REPLACE(fighters, ',', '') FROM table
Though why you'd want to do this in query rather than stripping it on the php side if beyond me
Upvotes: 2