Note that there are some explanatory texts on larger screens.

plurals
  1. POSplitting Array Based on Array Values
    primarykey
    data
    text
    <p>I have an array full of dynamic <code>&lt;select&gt;</code> field options, that I would like to be split into separate arrays based on a certain value within each "loop".</p> <p>Basically, I'd like two arrays: one with the data associated with <code>[subfirmdetailtype_id] = 14</code>, and one with <code>[subfirmdetailtype] = 25</code>.</p> <p>Any help would be appreciated!</p> <pre><code>Array ( [0] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Open [subfirmdetailtype_id] =&gt; 14 ) ) [1] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Closed [subfirmdetailtype_id] =&gt; 14 ) ) [2] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Large Growth [subfirmdetailtype_id] =&gt; 25 ) ) [3] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Large Blend [subfirmdetailtype_id] =&gt; 25 ) ) [4] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Large Value [subfirmdetailtype_id] =&gt; 25 ) ) [5] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Mid Growth [subfirmdetailtype_id] =&gt; 25 ) ) [6] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Mid Blend [subfirmdetailtype_id] =&gt; 25 ) ) [7] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Small Growth [subfirmdetailtype_id] =&gt; 25 ) ) [8] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Small Blend [subfirmdetailtype_id] =&gt; 25 ) ) [9] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Small Value [subfirmdetailtype_id] =&gt; 25 ) ) [10] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; World Bond [subfirmdetailtype_id] =&gt; 25 ) ) [11] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Multisector Bond [subfirmdetailtype_id] =&gt; 25 ) ) [12] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Municipal Debt [subfirmdetailtype_id] =&gt; 25 ) ) [13] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Heigh Yield Muni [subfirmdetailtype_id] =&gt; 25 ) ) [14] =&gt; Array ( [Subfirmdetailoption] =&gt; Array ( [option] =&gt; Heigh Yield [subfirmdetailtype_id] =&gt; 25 ) ) ) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload