Created
December 30, 2016 16:11
-
-
Save incubs/1f96d5edbca927ff1278ed3af420fe3c to your computer and use it in GitHub Desktop.
implode
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 if (isset($_POST["table"])) { ?> | |
<div class="container"> | |
<table class="table-condensed table-hover table-bordered" > | |
<tr> | |
<?php | |
if(!empty($_POST)) | |
{?> | |
<th><?php echo implode('</th><th>', array_keys($_POST)); ?></th> | |
<?php } | |
?> | |
</tr> | |
<tr> | |
<?php | |
if(!empty($_POST)) | |
{ | |
foreach ($_POST as $tablehead => $value) | |
{ | |
?> | |
<td><?php if (!empty($value)) | |
{ | |
if (is_array($value)) { | |
foreach ($value as $item) { | |
echo $item." "; | |
} | |
} | |
else | |
{ | |
echo $value; | |
} | |
}?></php></td> | |
<?php | |
} | |
} | |
?> | |
</tr> | |
</table> | |
</div> | |
<?php }?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment