In my php page, I'm querying a database table and the results are shown in an html table format.
One field of the database table contains <script>
codes and commented lines along with other code. For eg:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr>
<td>
<!-- STORES html -->
<!-- Start: Code -->
<script type="text/javascript">
console.log("testing");
if ( $.inArray( 'apple', ["apple", "orange", "grapes"]) > -1 ) { // fruits
console.log("found");
} // fruits
</script>
<!-- End: -->
</td>
<td>row2</td>
</tr>
</table>
The data for the <td>
which contains jquery content is not getting displayed. I've added the code in this jsfiddle.
Can anyone help me to fix this? Thanks in advance.
</div>