Re: Notice: Undefined offset: 3 in ..........

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PartyPosters wrote:
Hello, Please could someone tell me why I am getting (Notice: Undefined offset: 3 in ..........) from using this code.


for ($i=0; $i<=3; $i++){ mysql_query("INSERT INTO shipped(userID, productID, distID, username,ship_company, ship_add1,ship_add2) VALUES(1, '$productID','$v_distIDArray[$i]', userID, '$v_companyArray[$i]','$v_add1Array[$i]','$v_add2Array[$i]')"); }

Because you only have 3 elements in one or more of those arrays. Remember, index 3 is the 4th element.


-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux