You hit the nail on the head, this is exactly why I fell in love with PHP. I learnt it back in the PHP4 days, and it just seemed like the perfectly straightforward way to do web.
In a similar fashion, I abstracted away the database connection, query and returning of results into one lazy-inited function, so talking to the database really was just like
<?=q("select name from users where id = $userid") ?>
I worked a lot with other languages, none feeling as natural to me as this one, aside from Ruby.