I noticed something weird within a query in a snippet. When I have a query like this:
$sql = 'SELECT * FROM table WHERE colomn = ' . $variable;
And I echo $sql
, the query reads:
SELECT * FROM table WHERE colomn = <code class="php plain">2</code>
.. which will result in an error because the $sql
is no longer valid.
So, for now I use strip_tags
to remove the code
tag, but I find it to be not a very clean method.
I couldn't find anything about this issue, so maybe someone can shed some light on this for me?