Thank you for the suggestion. I need to account for multiple spaces also (we all know the users don’t think like coders).
I ended up just telling it to identify any multiple spaces.
[php]$page_data[‘output’] = preg_replace("/\s+/", ‘,’, $this->input->post(‘input’));[/php]
Apparently PHP also recognizes line breaks as a space or multiple space because it worked, kinda strange.
sXi, didn’t see your post as I was posting. Consider it saved and printed. I have a good handle on regular expressions but cheat sheets are always nice.