Search
 
SCRIPT & CODE EXAMPLE
 

PHP

fixing unclosed html tags

$str = "
<html>
 <head>
  <title>test</title>
 </head>
 <body>
  <p>error</i>
 </body>
</html>
";

$doc = new DOMDocument();
@$doc->loadHTML($str);
echo $doc->saveHTML();
Comment

PREVIOUS NEXT
Code Example
Php :: What is the name of scripting engine in PHP? 
Php :: png to pdf 
Php :: pass data to blade laravel 
Php :: parseint php 
Php :: laravel collection union 
Php :: php laravel string substring 
Php :: array map php 
Php :: page.php woocommerce 
Php :: php include file for its symlink directory 
Php :: laravel where json array column 
Php :: clear the compiled classes 
Php :: Laravel all() and get() 
Php :: getting routes in middleware laravel 
Php :: adding two numbers in php 
Php :: substr_count excact match php 
Php :: laravel request not returning errors 
Php :: how to separate admin and user login in laravel 
Php :: laravel scope 
Php :: package manifest php error 
Php :: relationship in laravel 
Php :: crypt password php 
Php :: php run command windows 
Php :: check box with value in php 
Php :: xampp php ini 
Php :: cache for php website 
Php :: laravel admin disable batch selection 
Php :: public_path lumen not defined 
Php :: laravel collection zip 
Php :: slim disable display error details 
Php :: echo two variables same line php 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =