Photozrme Posted April 19, 2010 Share Posted April 19, 2010 Hello everyone, I'm working on a PHP workflow management project at my company to help increase our productivity. So far I've done a soft rollout and it's working really well. My issue right now is I need help on how to handle dynamic form variables. I thought multi-dimensional arrays would be the best option. I have 3 dynamic fields: Productid[] | Quanitityid[] | Costid[] Essentially for each line, I would need to do a database search on the productid to find the cost, and then multiply it by the quantityid and store the cost as costid[]. My idea was to use a multi-dimensional array into one entry on a database for the whole thing, and perform MySQL lookup and math functions within the array. Then, later on, I would be able to pull statistics of cost based on the costid[] of all the entries (based on datestamp and whatnot). I'm not asking anyone to write the code for me, just to point me in the right direction. Should I store each element separately? Or is there a better way to do this? Or am I not making any sense? Thank you very much! Link to comment https://forums.phpfreaks.com/topic/199037-dynamic-form-info-into-a-multi-dimensional-array/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.