Jump to content

Help me to create a dynamic list....


ceylongeek

Recommended Posts

Guys,

 

I am new to this forum and also for PHP development.I have created small PHP apps with your help. Now I am going to create a new PHP website.For that I need to create a dynamic list.Actually here as a list, I mean features of a product.Amount of feature vary from product to product so the length of the list also should be vary from product to product.I can create a 'dynamic text constant size' list but hard to create a complete dynamic list.I need your kind help to create such a list guys.

 

I have attached a image for your ease of understanding.

 

 

If you have a idea please post it here.Because idea makes solutions.

 

Thank you

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/216759-help-me-to-create-a-dynamic-list/
Share on other sites

If this really is for "products" then you should be storing this data in a database. You would have one table for the products, a second table to list the 'possible' product features and a third table to associate the appropriate features to the appropriate products.

 

If this is merely for hypothetical purposes or for elements that will not hcnage then you could use a multidimensional array

'ProductA' => array(



),
'ProductA' => array('AAAAAA', 'BBBBBBB', 'CCC', 'DDDDD',
          'EEEEEEE', 'FFFFFF', 'GGGGGGGG'),
'ProductB' => array('YYYYY', 'BBBBBBB', 'CCC', 'UUUUU', 'ZZZZZZZZZ',
          'MMMMMM'),

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.