Forked from hikari-no-yume/what_php_should_be.language
Last active
August 29, 2015 14:16
-
-
Save wareya/679d7c314e74dbea5f22 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
# 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