Кратък пример как може да се фиксне или валидира html с php5 tidy:
$tidy = new Tidy();
$options = array(‘show-body-only’=>true);$tidy->parseString(‘<div><b>Martin</b></b> Petrov’,$options);
$tidy->cleanRepair();
echo $tidy;
Изходът е:
<div><b>Martin</b> Petrov</div>
Един отговор
super evala
Logged in as {{omniform_current_user_display_name}}. Edit your profile. Log out? Required fields are marked *
Your email address will not be published. Required fields are marked *
Comments are closed.
You must be logged in to post a comment.