Created
May 13, 2015 07:30
-
-
Save tamura/8a5058625b606b57f8fb to your computer and use it in GitHub Desktop.
キーマージ
This file contains 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
echo '<table class="table table-condensed table-bordered">'; | |
$confkeys=array(); | |
foreach ($config as $key => $row) { | |
# code... | |
$confkeys=array_merge($confkeys,array_keys($row)); | |
} | |
$confkeys=array_unique($confkeys); | |
echo "<tr>"; | |
foreach ($confkeys as $confk) { | |
# code... | |
printf('<th>%s</th>',$confk); | |
} | |
echo "</tr>"; | |
foreach ($config as $key => $row) { | |
echo "<tr>"; | |
foreach ($confkeys as $confk) { | |
# code... | |
printf('<td>%s</td>',mb_substr($row[$confk], 0, 12,"UTF8")); | |
} | |
echo "</tr>"; | |
} | |
echo '</table>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment