$tag_name = input;
$new_class = yourclass;
eregi_replace(($tag_name), \\1 class=\$yourclass\, $yourstring);
will work for simple cases, but isn't going to give you much more power than
just applying a style to the tag iself - 'input { border : 1px }' say). If
the design is consistent, you can
Hi Peter,
You could try this:
?
$string = Blah iitalic/iinput type=\name\ Blah bbold/b;
$new_string = preg_replace(/input(.*?)/i, input\\1 class=3D,
$string);
echo $stringbrbr$new_string;
?
preg_replace = regular expression replacement
input = first part of tag
(.*?) = whatever, but not:
2 matches
Mail list logo