mattspriggs28 Posted September 8, 2011 Share Posted September 8, 2011 Hi all, I have an array of data. I am looping through this data to generate a CSV file. However, if there are commas in any of the elements then this will throw out the structure of the CSV file. My question is, how do I loop through the array before I use it to strip out any commas and replace with a space? Thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/246689-removing-specific-characters-from-array-elements/ Share on other sites More sharing options...
voip03 Posted September 8, 2011 Share Posted September 8, 2011 str_replace OR preg_replace http://php.net/manual/en/function.str-replace.php Quote Link to comment https://forums.phpfreaks.com/topic/246689-removing-specific-characters-from-array-elements/#findComment-1266744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.