Filter a string for words that starts with a "?" and put them in a <span> - PHP -
what wanna filter string one:
"?group title"
and output this:
<span class="group">group</span> title
my question offcourse is: possible php? , how this?
try this
$text = preg_replace('/\?(\w+)/', '<span class="$1">$1</span>', $text);
Comments
Post a Comment