|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi!
I have a dynamically made form with several text input boxes which are named "content_description1" through "content_description6". The number of them varies. I want to put the value of these input boxes into an array, how can I do it? I can't find a way to extract the name of the variables the value is put in. I can't hard code the names of them, since the number of them varies. Anyone have any suggestions? I'm totally new to PHP, but I have experience in other languages. Any help greatly appreciated. |
|
#2
|
|||
|
|||
|
Use something like:
name=content_description[] This will place the entries in an the array $content_description indexed beginning at 0. HTH Rod |
|
#3
|
|||
|
|||
|
OK, I'll try that, it seems better than what I've done now, which is a loop that goes through all the input boxes using eval() to construct the name of the variable and then put it in an array.
Thanks! /Gardener |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Getting form-information in array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|