Home »
General »
PHP discussions »
problem with arrays/loops in PHP and javascript
problem with arrays/loops in PHP and javascript [message #34544] |
Mon, 06 November 2006 19:37 |
jfern
Messages: 2 Registered: November 2006 Location: New York
Karma: 0
|
Junior Member |
|
|
I am having a problem where my code only works if I fill 14 or less elements of an array(using php and javascript. If I use more than that, it doesnt work:
var a = new Array();
var i = 0;
<?php
$k = 15;
for ($j = 0; $j < $k ; $j++)
{
?>
a[i] = ('<?php echo $rows[$j] ?>');
i++;
<?php
}
?>
when $k is 14 or less, this code works fine, but when it is 15 or more, it doesnt work. I can't for the life of me figure out why this would be a problem.
Any help would be greatly appreciated.
Thanks!
-Josh
|
|
|
|
Goto Forum:
Current Time: Thu Oct 31 14:40:09 GMT 2024
Total time taken to generate the page: 0.03275 seconds