0 LIKES LikeUnLike
I have a for loop that i need to insert into a SQL database. The only problem is that when i try to insert it will only insert the last result and i need to insert all the reslts of the loop. Hope you understood what i'm trying to say, here's an example if it will help you:$array;for ($i=0; $i < 5; $i ){ $db_insert = $array[$i];}$query = "INSERT INTO something (name) VALUES ('{$db_insert}')";But it's inserting only $array[4] and i need to insert $array[0] $array[1] $array[2] $array[3] $array[4]
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 3 answers.