Jump to content
php.lv forumi

HTML liegshana!


Sasa

Recommended Posts

cik sapratu ja es ielieku strip_tags() tad vinsh grieziis piniigi visus tagus araa kas ir iespeejami!

 

bet nesaprotu kaa darbojas tas htmlspecialchars() kur es vinjam noraadu kaadsu BBcode tagus laist cauri

Link to comment
Share on other sites

$comment = preg_replace('~\[i\](.*?)\[\/i\]~is', '<i>\\1</i>', $comment);

$comment = preg_replace('~\[b\](.*?)\[\/b\]~is', '<b>\\1</b>', $comment);

$comment = preg_replace('~\[u\](.*?)\[\/u\]~is', '<u>\\1</u>', $comment);

Link to comment
Share on other sites

×
×
  • Create New...