Comunitatea PHP Romania
 

 
strip_tags

strip_tags

This strips out markup tags, basically anything between < and >.

Parameter PositionTypeRequiredDefaultDescription
1boolNoTRUEThis determines whether the tags are replaced by ' ' or ''

Example 5-20. strip_tags

<?php

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

?>

Where template is:

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

Will output:

Blind Woman Gets <font face="helvetica">New Kidney</font> from Dad she Hasn't Seen in <b>years</b>.
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.

See also replace and regex_replace.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
mihaitha mihaitha
Sibiu
Mascka Mascka
Braila
gabysolomon gabysolomon
Bacau
whooper whooper
Toronto ON
raul_ raul_
dechim dechim
Drobeta Turnu Severin
Amenthes Amenthes

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Repair Bad Credit | Debt Help | 0 Credit Cards | Homes for Sale | MPAA
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis