I still havent found a site that shows what I need.
I dont think php.net explain how ereg works.

I only want to publish stuff from the stringvariable $text thats inside tags
looking like this

<FONT COLOR="#8f8f15">This shall be visible</FONT>
or
<FONT COLOR="#007f7f">This shall be visible too</FONT>

thanks
Martin

Try the following:

<?php
function format_text($text){
$text = ereg_replace("(<[^>]+>)([^<]+)(</[^>]+>)",'\\2',$text);
return $text;
}

print format_text('<FONT COLOR="#8f8f15">This shall be visible</FONT>.');

?>



--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to