title: Looping through array and changing value with if statement
body: <p>I have the following array of data from a <code>DB</code> and would like to change the <code>STATUS</code> value to a string if it matches criteria</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [ORDER] =&gt; 1321[DATE] =&gt; 2015-10-05 [TEXT] =&gt; TESTING [OTIME] =&gt; 06:03:03 [STATUS] =&gt; 3 [CODE] =&gt; ABC) [1] =&gt; stdClass Object ([ORDER] =&gt; 1321[DATE] =&gt; 2015-10-05 [TEXT] =&gt; TESTING [OTIME] =&gt; 06:03:03 [STATUS] =&gt; 3 [CODE] =&gt; ABC ) ) 
  </code></pre>
  
  <p>I want to loop through the data and do and do something like below:</p>
  
  <pre><code>if (STATUS=3) {
          STATUS ="replace the number with some text";
      }
  </code></pre>