You're probably on about template engines, Namely Smarty
Some example code:
include('Smarty.class.php');
// create object
$smarty = new Smarty;
// assign some content. This would typically come from
// a database or other source, but we'll use static
// values for the purpose of this example.
$smarty->assign('name', 'george smith');
$smarty->assign('address', '45th & Harris');
// display it
$smarty->display('index.tpl');
the .tpl file
<html>
<head>
<title>Info</title>
</head>
<body>
<pre>
User Information:
Name: {$name}
Address: {$address}
</pre>
</body>
</html>
Replaces {$name} and {$address} with George smith and 45th & Harris.