Link to home
Start Free TrialLog in
Avatar of warrenlyle
warrenlyle

asked on

php array from input hidden

Is it possible to grab a bunch of values from an html page, put them in a hidden,
and then have a php script process the value of the hidden like

foreach ($hiddenArray as $var) {

}
Avatar of Diablo84
Diablo84

if you had multiple hidden fields they would each have to be called name[]

example

<input type="hidden" name="iput[]" value="something">
<input type="hidden" name="iput[]" value="something else">
<input type="hidden" name="iput[]" value="another thing">
<input type="hidden" name="iput[]" value="one more thing">

then on the processing page

$hiddenArray = $_POST['iput'];

foreach ($hiddenArray as $var) {
 //do something with each value
}
ASKER CERTIFIED SOLUTION
Avatar of Diablo84
Diablo84

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of warrenlyle

ASKER

thanks!!
no problem :)

|)iablo