PHP Tidy & closing tags query

Jesus Disciple

New Member
I'm just curious as to why this works:\[code\]$config = array('wrap' => 0,'show-body-only' => TRUE,);$str = '<p>Hello World!';$tidy = tidy_parse_string($str, $config);tidy_clean_repair($tidy);echo (htmlentities($tidy)); //outputs <p>Hello World!</p> \[/code\]while this doesn't:\[code\]$config = array('wrap' => 0,'show-body-only' => TRUE,);$str = 'Hello World!</p>';$tidy = tidy_parse_string($str, $config);tidy_clean_repair($tidy);echo (htmlentities($tidy)); //outputs Hello World! \[/code\]
 
Back
Top