Baffled by Undefined Index in Simple Array: Please Help!


Posted on 16th Feb 2014 07:03 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

ALV grid with 2 headers
Hi Gurus,

I need to display ALV GRID as below.

Header1

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

TabControl Inside ListView Not Editing
Hello everybodyI have a ListView on my page. Inside the ListView I put a TabControl, cuz I want to p

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

Access database inside of a validation class
Hello,

For quite some time, I have been using functions to validate form input and access the

! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

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



Play Free Quiz and Win Cash