note 36283 deleted from function.strip-tags by didou
| From: | didou@php.net | Date: | Fri, 03 Oct 2003 11:52:01 +0000 |
| Subject: | note 36283 deleted from function.strip-tags by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57726@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster@phatsonic.de
----
For coders new to PHP:
If you want PHP to output a string WITHOUT parsing any Tags ( HTML, <?, <?php, ?>, ... )
this function may be what you need:
$withTags = 'Sometimes <a href="http://www.phatsonic.de">Links</a>';
$withTags .= ' or <b>Design</b>-<i>Tags</i> should not be
parsed.';
$withTags .= ' Think about: <?php echo "really bad code"; ?>';
$withoutTags =
str_replace(array('<','>'),array('<','>'),$withTags);
echo 'The string "text-only": '.$withoutTags;