<?php function makeTag( $string , $pattern ) { $text =''; foreach( $matches[0] as $znak ) { $text.=$znak[0]; } return $text; } ?>
przyklad:
<?php $string = 'to jest jakis string _ ktory ma znaki ^%@#$@#$!#!@#*^& specjalne :)'; $pattern = '/([a-z_ ])/'; $text = makeTag($string , $pattern ); ?>
rezultat:
<?php $text = 'to jest jakis string _ ktory ma znaki specjalne'; ?>
zna ktos latwiejszy sposob

dziekuje