{{extend "layout.html"}}

web2py vs PHP

In PHP
{{=CODE("""

Records

$name
Phone:$phone



"; $i++; } ?>""",language='html')}}

In web2py
{{=CODE("""def contacts(): return HTML(BODY(H1('Records'),db().select(db.contacts.ALL)))""",language='python',link='/examples/global/vars/')}}
HTML, BODY, H1, etc. are helpers that build HTML tags. SQLTABLE is a special helper that can render as HTML TABLE any set of records.