Created
March 1, 2015 17:27
-
-
Save hikari-no-yume/c2b78034fd03334da61f to your computer and use it in GitHub Desktop.
what_php_should_be
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
# imagine, for a second: | |
db = new db('mysql:localhost') | |
results = ( | |
select | |
name, age, photo | |
from | |
db.elePHPants | |
where | |
age > 16 | |
) | |
list = <ul></ul> | |
for result in results | |
list.appendChild( | |
<li class="elephpant"> | |
<img src="{result.photo}" alt="photo of {result.name}"> | |
<span>{result.name}, age {result.age}</span> | |
</li> | |
) | |
render(list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment