html code showing up in php string
<p>I am using var_dump to output a string but the length is different then what is showing so I printed out each character and found there are the hidden html codes #40; and #41; in the string attributing to the length. These are causing problems in an sql statement so I am trying to remove them, but htmlspecialchars_decode, and urldecode do not remove the characters. How can I get ride of these codes? The value is coming from a database is utf-8 (CHARSET=utf8 COLLATE=utf8_bin) and does not have any html codes stored in it (stored as "Civic (sedan)" in table).</p>

<pre><code>//this is the output of the string
Civic (#40;sedan)#41;
echo var_dump($data['model']).'&lt;br&gt;';

//output
string(21) "Civic (sedan)" 

echo var_dump(strip_tags($data['model'])).'&lt;br&gt;';

//output
string(21) "Civic (sedan)" 

echo var_dump(htmlspecialchars_decode($data['model'])).'&lt;br&gt;';

//output
string(21) "Civic (sedan)" 

echo var_dump(urldecode($data['model'])).'&lt;br&gt;';

//output
string(21) "Civic (sedan)" 
</code></pre>
