Looking up data in one array to build another array
<p>I have an array like this....</p>

<pre><code>$interests = ['f13d6415ed' =&gt; 'Mailing', 'a6e5730911' =&gt; 'Friend-Family', '998f2252f5' =&gt; 'Friend-Patron', '6873081334' =&gt; 'Adult', '89c4c64d51' =&gt; 'Non-Acting', 'ea325784ac' =&gt; 'Life', '8ffdecd43d' =&gt; 'Youth Theatre', '6752d0543e' =&gt; 'Young Person',];
</code></pre>

<p>... and I need to end up building an array like this (used in an api call)...</p>

<pre><code>'interests' =&gt; ['f13d6415ed'=&gt;false, 'a6e5730911'=&gt;false, '998f2252f5'=&gt;false, '6873081334'=&gt;true, '89c4c64d51'=&gt;false, 'ea325784ac'=&gt;false, '8ffdecd43d'=&gt;false, '6752d0543e'=&gt;false ],
</code></pre>

<p>So I can do an array_search() on the first array (given the text term) and get the key needed. Then I need to build the second array where the data for the given key (there will only be one) is 'true' and all others are 'false'. This second array is part of the parameters of an api call (Mailchimp). 
I can see a few ways to do it but I'm not a php expert and they all seem very messy. Any suggestions?<br>
Thanks</p>