i stuck to attach counter-var (b) on text-variable (string) - not mathematical - Just to add counter(b) on data-var in JS...
Example:
<script type="text/javascript">
<?php
$i=0;
foreach ($sqldata as $data){
echo 'var data'.$i.' =
Array("'.implode('", "', array_map('addslashes', $data)).'");';
$i++;
}
echo 'var data_ges = '.$i.' ;';
?>
for (b=0; b<data_ges; b++){
document.writeln (data+b[1]); // ERROR LINE - How do i escape here ?
}
</script>
Thanks!