title: Check for two key values from serialized array
body: <p>We have been using the below code to create a progress report for users. It checks an array for each user under _usermeta. It worked up until now because the plugin that creates the data would only add the value for the lesson if it was completed. Now it adds the value regardless and has a second value for whether it has been completed or not. Any ideas on how to make this work?</p>
  <pre><code>/* php for the page itself */
  
   foreach($usersemail['users'] as $userdata){
           
                     $dtd=  get_user_meta($userdata['user_id'] ,'_sfwd-course_progress',true);
                     
                  ?&gt;
                  &lt;tr&gt;&lt;td&gt;&lt;?php echo get_user_meta($userdata['user_id'],'first_name',true).' '.get_user_meta($userdata['user_id'],'last_name',true);  ?&gt;&lt;/td&gt; 
              &lt;?php   
                    foreach($dtd as $dt){
                         if(array_key_exists('21414',$dt['lessons'])){
                         $lession_complete= false; 
                         echo &quot;&lt;td&gt;completed &lt;/td&gt;&quot;; 
                         }else{
                          echo &quot;&lt;td&gt; &lt;/td&gt;&quot;; 
                         } 
                        
                          if(array_key_exists('21416',$dt['lessons'])){
                          $lession_complete= false; 
                         echo &quot;&lt;td&gt;completed &lt;/td&gt;&quot;; 
                         }else{
                          echo &quot;&lt;td&gt; &lt;/td&gt;&quot;; 
                         } 
                          if(array_key_exists('21418',$dt['lessons'])){
                          $lession_complete= true; 
                         echo &quot;&lt;td&gt;completed &lt;/td&gt;&quot;; 
                         }else{
                          echo &quot;&lt;td&gt; &lt;/td&gt;&quot;; 
                         } 
  </code></pre>
  <pre><code>/*example of table from _usermeta */
  
  a:1:{i:21126;a:6:{s:7:&quot;lessons&quot;;a:5:{i:21412;i:1;i:21414;i:0;i:21416;i:1;i:21418;i:1;i:21420;i:1;}s:6:&quot;topics&quot;;a:5:{i:21412;a:0:{}i:21414;a:0:{}i:21416;a:0:{}i:21418;a:0:{}i:21420;a:0:{}}s:9:&quot;completed&quot;;i:5;s:5:&quot;total&quot;;i:5;s:7:&quot;last_id&quot;;i:21420;s:6:&quot;status&quot;;s:11:&quot;in_progress&quot;;}}
  </code></pre>
  <p>Using lesson 21416 as an example: I need it to echo &quot;complete&quot; if both the lesson is found (21416) and if the value following it is &quot;i:1&quot;. With the default being the empty td if the value is i:0.</p>
  <p>Thanks in advance!</p>