I have a file with format
<script src="test.php"></script>
And code in test.php with table test(id, name) with 4000 rows
<?php
$sql = "Select * From test";
$data = array();
$query = mysql_query($sql);
while($row = mysql_fetch_object($query)) {
$data[] = $row;
}
$str = '';
foreach($data as $row) {
$str .= $row->name;
}
?>
output('<?php echo $str ?>');
When I run code is error is unterminated string literal, but when repair code with
$sql = 'Select * From test order by id limit 100' is no error, how to fix it ?