![currentkey stats currentkey stats](https://spencerdailey.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-18-at-4.59.37-PM-768x480.png)
If the internal pointer points beyond the end of the elements list or the array is empty, key() returns NULL.
![currentkey stats currentkey stats](https://images.ifun.de/wp-content/uploads/2019/05/currentstats-key-700x435.jpg)
![currentkey stats currentkey stats](https://static.macupdate.com/screenshots/258589/m/currentkey-stats-screenshot.png)
The key() function simply returns the key of the array element that's currently being pointed to by the internal pointer. but the bold italic as you can see, returns 0 instead of the 20 that is actually in the form name value.Īccording to the PHP documentation of key():
![currentkey stats currentkey stats](https://mac-cdn.softpedia.com/screenshots/CurrentKey-Stats_5.png)
The bold parts, are the parts that successfully come out in my second example. So once the user enters the values I need those values to go into a database.or in the test, echo out. The numbers are generated based on things in the database, so 20 would correlate to "width" 27 would correlate to "height" for example.
#CURRENTKEY STATS CODE#
(obviously not the exact code to follow but the examples are identical conceptually) inputted value = height I have a form with dynamically generated fields like so. Ok so, I am building something for my employer for them to input products, they have very specific requirements.