Skip to content

Instantly share code, notes, and snippets.

@kresnasatya
Created December 27, 2016 09:41
Show Gist options
  • Save kresnasatya/1a80bdc409920029a37a8eef62ff65d7 to your computer and use it in GitHub Desktop.
Save kresnasatya/1a80bdc409920029a37a8eef62ff65d7 to your computer and use it in GitHub Desktop.
Snippet for syntactic sugar
<!DOCTYPE html>
<html>
<head>
<title>Tanpa Syntactic Sugar</title>
</head>
<body>
<table>
<tr>
<th>No</th>
<th>Nama</th>
<th>Kelas</th>
</tr>
<?php $no = 1; foreach($x as $y) { ?>
<tr>
<td><?php echo $no; ?></td>
<td><?php echo $y->nama; ?></td>
<td><?php echo $y->kelas; ?></td>
</tr>
<?php $no++; } ?>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment