Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wipflash's avatar

Populate Multi-Select Box

Hello,

I have a serious problem with populating multi select box. What I am doing there is 3 tables called attribute, attributeValue, combination.

Attribute table has id and name. AttributeValue table has id, attributeId and value; combination table has id and combination. the combination field save as a json string (only save the attribute value located on attributevalue table (ex: ["8","11"]) .

Following show the image of tables

What I need:

  • get the JSON srting (I have done this step).
  • then search the equel values from attributeValue table and get attributeId.
  • then search attribute name using attributeId in attribute table.
  • finally populate the list box with attribute name: attribute value ex: <option>name: value</option>
0 likes
0 replies

Please or to participate in this conversation.