Created
March 27, 2012 14:56
-
-
Save ryuichimatsumoto-single/2216590 to your computer and use it in GitHub Desktop.
array to print to html
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
<?php | |
/** | |
* デザイナーとの分業しやすいソースコード | |
* This source use if corder and designer divide your works. | |
*表示の為の連想配列(array to print to html) | |
*/ | |
$data = array | |
( | |
0 => "column0", | |
1 => "column1", | |
2 => "column2", | |
3 => "column3", | |
4 => "column4" | |
) | |
?> | |
<!--html part--> | |
<html> | |
<body> | |
<table> | |
<?php foreach($data as $key => $value) { ?> | |
<tr> | |
<td><?php echo $key; ?></td> | |
<td><?php echo $value; ?></td> | |
</tr> | |
<?php }?> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment