PHP str_replace not working correctly

sewrobb

New Member
I'm using str_replace and it's not working correctly.I have a text area, which input is sent with a form. When the data is received by the server, I want to change the new lines to ",".\[code\]$teams = $_GET["teams"];$teams = str_replace("\n",",",$teams);echo $teams;\[/code\]Strangely, I receive the following resultChelsea,real,Barcelonainstead of Chealsea,real,Barcelona.What's wrong?
 
Back
Top