2

I looked to a php tutorial from 2010 and I found that where I suppose to see <?php bla bla ?> I see something like this:

<meta name="description" content="{metadescription}" /> 
<meta name="keywords" content="{metakeywords}" /> 

Is this an old php syntax. I assumed that metadescription is a variable and you have to do something like this:

<?php echo $metadescription ?>

Please someone give me an idea what is happening.

Ravi Hirani
  • 6,511
  • 1
  • 27
  • 42
dragon
  • 1,212
  • 13
  • 24
  • 3
    Looks like a template engine to me, either server-side or client-side (hopefully such tags are not handled client-side, but I've seen it done, even though it defeats the purpose of these tags). – Alexander O'Mara Jan 22 '16 at 05:59
  • Is that in a PHP block? – chris85 Jan 22 '16 at 06:00
  • 1
    I don't believe this is a duplicate of [Curly braces in string in PHP](http://stackoverflow.com/questions/2596837/curly-braces-in-string-in-php) as these strings do not look like PHP variables. – Alexander O'Mara Jan 22 '16 at 06:03
  • I think that Alexander O'Mara is right, but I'm not sure, because I'm not so good at php. The book where I found this is PHP 5 e-commerce Development, but I didn't find anywhere in the book a mention about any template: Smarty or other ones. I tried the code that I downloaded and I get everything in those curly brackets on the page. – dragon Jan 22 '16 at 06:11
  • http://stackoverflow.com/a/34940124/5678086 – Thanga Jan 22 '16 at 06:44

1 Answers1

1

This is smarty syntax. It is a php template engine used to separate the view. Please refer http://www.smarty.net/ for more info

Thanga
  • 7,811
  • 3
  • 19
  • 38