jasonc Posted July 25, 2010 Share Posted July 25, 2010 I have many forms each with many fields. I wish to simplify the alteration of these as the process is long winded (edit form, update each line, edit return page file and so on. I have a function that will create the forms and one to read the info sent. What I am having problems with is creating the array with all the form data fields and id's and names. I am wishing to use a simple method say... $array[contactusform][name][fieldid] (which would return say 'name' which would be the fieldid) $array[contactusform][name][fieldtext] (which would return say 'Please enter you name*' which would be the text shown beside the text field) and so on.. can anyone suggest a way to do this in a single array, as i am currently having each form in a seperate array which is now not going to work with new features i wish to introduce the to site. Link to comment https://forums.phpfreaks.com/topic/208836-need-help-to-contruct-multi-level-array/ Share on other sites More sharing options...
Bisa Posted July 25, 2010 Share Posted July 25, 2010 This could be what you are looking for perhaps: http://www.webcheatsheet.com/PHP/multidimensional_arrays.php Link to comment https://forums.phpfreaks.com/topic/208836-need-help-to-contruct-multi-level-array/#findComment-1090931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.