I have problem with the code
<script type="text/javascript"> test(<?php echo $i;?>)</script>
If I passed some other variable as mentioned above it's working
but not working for below code
<script type="text/javascript">test(<?php echo $row['name'];?>)</script>
pass it like this
<script type="text/javascript">test("<?php echo $row['name'];?>")</script>