Created
August 15, 2010 11:31
-
-
Save mkroman/525391 to your computer and use it in GitHub Desktop.
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
| <?php | |
| $row = FALSE; | |
| // show the first row in the table. | |
| print "<tr> | |
| <td colspan=\"3\" class=\"sechead\"><span>C</span>ontact <span>I</span>nfo</td> | |
| </tr>"; | |
| // now foreach the bastards array... | |
| foreach($contactArray as $key=>$value) { | |
| if ($value == NULL || $key == "user_id" || $key == "pc_id" || trim($value) == "") | |
| continue; | |
| else { | |
| // use array key to find out the field name | |
| $fieldName = $contactInfoArray[$key]; | |
| // Then we can now use $value as well | |
| print "<tr> | |
| <td> </td> | |
| <td width=\"30%\" class=\"celllineleft\">{$fieldName}</td> | |
| <td width=\"50%\" class=\"celllineright\" colspan=\"2\">{$value}</td> | |
| </tr>"; | |
| $row = TRUE; | |
| } | |
| } | |
| var_dump($row); | |
| if ($row == FALSE) { | |
| print "<tr> | |
| <td> </td> | |
| <td width=\"30%\" class=\"celllineleft\"> </td> | |
| <td width=\"50%\" class=\"celllineright\" colspan=\"2\">User has not updated their contact information.</td> | |
| </tr>"; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment