swapped out addslashes in favour of str_replace, csv style