PHP Templating: Variable Date
In building a template system, you may want some way to inject date info using a timestamp (perhaps generated through mktime() ) and date(). But you don’t want the format to be dependent on the template parser, but rather specified through the variable in the template itself.
$template = preg_replace(
"#\%date(\:\s*(.*?))?\%#ei",
[...]
Subscribe via Email Alerts
Subscribe in an RSS reader
What is RSS?
Eternicode on Twitter