[PHP] Variables

Rimmskinator

New Member
Dec 29, 2014
25
2
Hey everyone,
so the problem is the fact I would much prefer to enter {web_name} (website name) rather than constantly typing out <?php echo $web_name ; ?>, it's easier and looks neater on code.

PHP:
$web_name=''; // Website name or company name.
$web_desc=''; // Website description in title tags
Currently has to be done as <?php ?> echo which is annoying

How do I go about using {}{}{}{}{}{}{}{}{}
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
You need to use a PHP Template system, look into using a PHP Framework with a template system as a solution.

Such as for an advanced system or for a lightweight and simple system.
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
If you're not interested in using a framework, I forgot to mention you can use a Template Engine on it's own, here is a popular one

this allows you to just use the { } instead of <?php ?>
 

Rimmskinator

New Member
Dec 29, 2014
25
2
If you're not interested in using a framework, I forgot to mention you can use a Template Engine on it's own, here is a popular one

this allows you to just use the { } instead of <?php ?>
Is making a framework hard?
 

Users who are viewing this thread

Top