I have a cycle:
for ($i = 1; $i <= $sql2['count']; $i++) { $result = mysql_query("SELECT * FROM inv where username='".$_SESSION['username']."' "); while ($inv= mysql_fetch_array($result)){ echo " i[$i] = new Array('".$inv['id']."','".$inv['id_img']."','".$inv['kolovo']."',0,'".$inv['title']."',0,'".$inv['about']."',0,1); "; } }
Is it possible to do that?
And there is also an error; new Array prints to duplicate like this:
i[1] i[1] i[2] i[2]
Please tell me how to fix it.