Hi, I'm using preg_replace to strip out a bunch of unwanted stuff from
the database. However the results seem to bunch up. Here's what I'm
doing
$old = htmlspecialchar s($row['name']);
$new = preg_replace("/[^a-zA-Zs]/", "", $old);
the results of this are
TomSmith
instead of
Tom Smith
What do I need to add to the expression to get the desired space
between words?
the database. However the results seem to bunch up. Here's what I'm
doing
$old = htmlspecialchar s($row['name']);
$new = preg_replace("/[^a-zA-Zs]/", "", $old);
the results of this are
TomSmith
instead of
Tom Smith
What do I need to add to the expression to get the desired space
between words?
Comment