An HTML DOM Contains characters such as id="xyz" or class:'col-md-3'. The problem is I have a PHP script which converts PHP variable to strings. But one of my variable contains HTML dom elements. I am having a hard time to convert that variable into a string.
My code:
foreach($result as $n){
$message1 = '"'.(string)$n['Message'].'"';
$message = "'".(string)addslashes($message1)."'";
{
error:
/><br /><table style=\'border:1px solid...
^ - error 1
AT <span id="cat_id"
^ - error 2
",\"
^ -error 3