Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 3ca7e0e5486da714e98ac79af09ca745 > files > 109

php-smarty2-doc-2.6.28-2.mga4.noarch.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>strip_tags</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="Smarty Manual">
<link rel="up" href="language.modifiers.html" title="Chapter 5. Variable Modifiers">
<link rel="prev" href="language.modifier.strip.html" title="strip">
<link rel="next" href="language.modifier.truncate.html" title="truncate">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">strip_tags</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="language.modifier.strip.html">Prev</a> </td>
<th width="60%" align="center">Chapter 5. Variable Modifiers</th>
<td width="20%" align="right"> <a accesskey="n" href="language.modifier.truncate.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="strip_tags">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="language.modifier.strip.tags"></a>strip_tags</h2></div></div></div>
<p>
     This strips out markup tags, basically anything between
     <code class="literal">&lt;</code> and <code class="literal">&gt;</code>.
  </p>
<div class="informaltable"><table border="1">
<colgroup>
<col align="center">
<col align="center">
<col align="center">
<col align="center">
<col>
</colgroup>
<thead><tr>
<th align="center">Parameter Position</th>
<th align="center">Type</th>
<th align="center">Required</th>
<th align="center">Default</th>
<th>Description</th>
</tr></thead>
<tbody><tr>
<td align="center">1</td>
<td align="center">bool</td>
<td align="center">No</td>
<td align="center"><code class="constant">TRUE</code></td>
<td>This determines whether the tags are replaced by ' ' or  ''</td>
</tr></tbody>
</table></div>
<div class="example">
<a name="id3040060"></a><p class="title"><b>Example 5.20. strip_tags</b></p>
<div class="example-contents">
<pre class="programlisting">

&lt;?php

$smarty-&gt;assign('articleTitle',
                "Blind Woman Gets &lt;font face=\"helvetica\"&gt;New
Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;."
               );

?&gt;

   </pre>
<p>
    Where template is:
   </p>
<pre class="programlisting">

{$articleTitle}
{$articleTitle|strip_tags} {* same as {$articleTitle|strip_tags:true} *}
{$articleTitle|strip_tags:false}

   </pre>
<p>
    Will output:
   </p>
<pre class="screen">

Blind Woman Gets &lt;font face="helvetica"&gt;New Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;.
Blind Woman Gets  New Kidney  from Dad she Hasn't Seen in  years .
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.

   </pre>
</div>
</div>
<br class="example-break"><p>
  See also
  <a class="link" href="language.modifier.replace.html" title="replace"><code class="varname">replace</code></a>
  and
  <a class="link" href="language.modifier.regex.replace.html" title="regex_replace"><code class="varname">regex_replace</code></a>.
  </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="language.modifier.strip.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="language.modifiers.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="language.modifier.truncate.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">strip </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> truncate</td>
</tr>
</table>
</div>
</body>
</html>