In my website I have certain preset variables such as the page title, year/time, and etc.
For example in my title I would use
<title> <?php echo $TITLE; ?> </title>
However, how would I make it so typing something like..
<title> [TITLE] </title>
Will produce the same result?
It’s recommended that you use the PHP tags for many reasons, including performance and stability. If you want to do less typing you could use the shorthand for echoing variables:
<?= $TITLE ?>.If you’re using a PHP version prior to 5.4 you might have to enable
short_open_tagsin your configuration. After version 5.4 these tags are always availableIf you’re dead set on using a different syntax for your HTML, you could look into a templating language like Smarty or Dwoo