Note that there are some explanatory texts on larger screens.

plurals
  1. POLooping through a row of emails
    text
    copied!<p>I need to hide certain accounts from the admin function.</p> <p>Currently, eash account is listed for the admin. However, I would like all emails that end with, lets say, gmail.com to be hidden until I ask for them to be listed with the others.</p> <p>This is the code for the emails I have:</p> <pre><code> if(empty($resLine['ord_conEmail'])){ $resLine['ord_conEmail'] = "Account {$resLine['ord_account']}"; } </code></pre> <p>And the larger of the code is:</p> <pre><code> $buffer .= " &lt;div id=\"catDetail\"&gt; &lt;h1&gt;Orders Listing$pnStr&lt;/h1&gt; &lt;div&gt; &lt;table class=\"roundTableFormat\"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Order ID&lt;/th&gt; &lt;th&gt;Order Date&lt;/th&gt; &lt;th&gt;Cust. Email Address&lt;/th&gt; &lt;th&gt;Order Total&lt;/th&gt; &lt;th&gt;Actions&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;"; forEach($res as $resLine){ if($resLine['ord_date'] &gt; mktime() - 86400){ //24 hours $resLine['ord_date'] = date("D jS - g:iA", $resLine['ord_date']); }else if($resLine['ord_date'] &gt; mktime() - 259200){ //OLD:display Day of Week for last five days (60*60*24*5=432000 sec //New: 3 days = 259200 $resLine['ord_date'] = date("D jS - g:iA", $resLine['ord_date']); }else{ //display full date $resLine['ord_date'] = date("M j, Y", $resLine['ord_date']); } $resLine['ord_total'] = "$".number_format($resLine['ord_total'], 2); if(empty($resLine['ord_conEmail'])){ $resLine['ord_conEmail'] = "Account {$resLine['ord_account']}"; } $buffer .= " &lt;tr&gt; &lt;td class=\"ds br\"&gt;{$resLine['ord_id']}&lt;/td&gt; &lt;td class=\"al ls br\"&gt;{$resLine['ord_date']}&lt;/td&gt; &lt;td class=\"al ls\"&gt;{$resLine['ord_conEmail']}&lt;/td&gt; &lt;td class=\"ar bl br\"&gt;{$resLine['ord_total']}&lt;/td&gt; &lt;td class=\"ds \"&gt; &lt;a href=\"?action=orders&amp;ordview={$resLine['ord_id']}\"&gt;View&lt;/a&gt; &lt;a href=\"?action=orders&amp;ordprint={$resLine['ord_id']}\"&gt;Print&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt;"; } </code></pre> <p>How can I create a loop to hide the certain emails from showing up?</p>
 

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