Jump to content

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'),

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.