Re: Notice: Undefined offset: 3 in ..........
| From: | Rasmus Lerdorf | Date: | Wed, 23 Mar 2005 00:17:44 +0000 |
| Subject: | Re: Notice: Undefined offset: 3 in .......... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211344@lists.php.net to get a copy of this message | ||
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