Here are my codes :
$value = "zkjxhvzkjxcvhnzxv"""!^!^!";
$html = new simple_html_dom();
$html->load('<input type="text" value="'.$value.'">');
echo $html;
A second way to do it but nothing has changed :
$value = "zkjxhvzkjxcvhnzxv"""!^!^!";
$html = new simple_html_dom();
$html->load('<input type="text" id='myID'>');
$input = $html->getElementById('myID');
$input->setAttribute("value", $value);
echo $html;
Thanks in advance.
If i escape the characters, i lose them. But you can use addslashes() method for removing them.
Here's the answer for my situation :
$value = "zkjxhvzkjxcvhnzxv"""!^!^!";
$html = new simple_html_dom();
$html->load('<input type="text" value='.$value.'>');
echo $html;
Change is :
value='.$value.' instead of value="'.$value.'";
Hope this helps anyone.