Baffled by Undefined Index in Simple Array: Please Help!


Posted on 16th Feb 2014 01:33 pm by admin

Hello. I have a form which posts an array to this script. However, I can't seem to access the values in the array; I keep getting an undefined index. Something is not right, but the code is so simple! What am I missing?

print_r($_POST['Item'][0]);
// Output is: Array ( ['Quantity'] => 1 ['Item_id'] => 5 )
echo $_POST['Item'][0]['Quantity'];
// Output is: Notice: Undefined index: Quantity in /Volumes/Macintosh HD/Sites/.../hal/item/reconcile.php on line 30

No comments posted yet

Your Answer:

Login to answer
76 Like 29 Dislike
Previous forums Next forums
Other forums

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

السويسرية المقلدة والساعات بيع، رولكس طبق الاصل، بريتلينغ الساعات المقلدة
[b][url=http://www.replicawatchstore.com.cn/ar/]السويسرية الم

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a d

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Google+ Indyaspeak @ Pinterest RSS