Pompiuses
08-02-2002, 12:21 PM
I have this string:
$old_text = "ert, ert,ert,ert,ert";
Sometimes there is a space behind the comma, sometimes it's not. How can I test if there is a space behind a comma, and if it is'nt put a space behind it?
So that $old_text prints:
ert, ert, ert, ert, ert
Something like this:
Search through the string $old_text, and test
if(there is space behind a comma)
{do nothing}
else
{insert a space behind the comma}
$old_text = "ert, ert,ert,ert,ert";
Sometimes there is a space behind the comma, sometimes it's not. How can I test if there is a space behind a comma, and if it is'nt put a space behind it?
So that $old_text prints:
ert, ert, ert, ert, ert
Something like this:
Search through the string $old_text, and test
if(there is space behind a comma)
{do nothing}
else
{insert a space behind the comma}