Created
September 10, 2012 12:22
-
-
Save thinkjson/3690630 to your computer and use it in GitHub Desktop.
Getting double the ammount I should on value $v
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $new_array = array(); | |
| $ret_html = "<table><tr><th>DMA</th><th>Leads</th></tr>"; | |
| while ($row = mysql_fetch_array($result)) | |
| foreach ($row as $key => $value) { | |
| if (isset($new_array["$value"])) | |
| $new_array["$value"]++; | |
| else | |
| $new_array["$value"]++; | |
| #= 1; | |
| } | |
| foreach ($new_array as $k => $v) { | |
| $ret_html .= "<tr><td>$k</td><td>$v</td></tr>"; | |
| } | |
| return $ret_html; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment