I just undertook my first project using WordPress. I must admit it’s a bit jarring returning to PHP after over a year of Ruby (but that’s a different topic…).
One thing I am struck by is the sheer amount of HTML mixed with code. This seems a recipe for broken markup. To that end, I’ve created a small DSL (kinda) that should create correct XHTML markup via PHP. Example usage:
I guess it’s just personal choice. I personally prefer stepping in and out of PHP rather than using a template system like Smarty or something. It’s so much less work and I very rarely make invalid XHTML.
But of course WordPress is pretty damn flexible, so you can do as you please.
Viewing 1 replies (of 1 total)
The topic ‘<?php echo … ?> a better way?’ is closed to new replies.