# \[PHP\] How do you make a template with variables?

**URL:** <https://forum.kirupa.com/t/php-how-do-you-make-a-template-with-variables/66882>\
**Category:** programming\
**Created:** [October 10, 2004, 3:24pm UTC](https://forum.kirupa.com/t/php-how-do-you-make-a-template-with-variables/66882 "2004-10-10T15:24:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronak](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Ronak](https://forum.kirupa.com/u/Ronak)\
**Post date:** [October 10, 2004, 3:24pm UTC](https://forum.kirupa.com/t/php-how-do-you-make-a-template-with-variables/66882/1 "2004-10-10T15:24:30Z")

</div>

How do you make a template in PHP with variables? I want to put variables in between curly braces. How would I do that?

You know like this…

```auto

<?php
  // template code
  // template variables assigned
  // whatever else
?>
 
<html>
<head>
<title>My Site - {TITLE}</title>
{META}
</head>
<body>
 
<table width="{TABLE_WIDTH}">
<tr>
<td>
....

```

You know what I mean? Thanks a mil if you can help me. Bye!

~Ron
