Clean Data From Line Breaks

When exporting data to CSV line breaks can cause problems getting the data into the correct columns, removing them is the best course of action.

This array will remove n and r and commas.

$name = str_replace(array("\r\n", "\n\r", "\n", "\r", ","), ' ', $name);
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn