PHP variabile in cod HTML, stil Template
Scris: Mie Ian 04, 2012
Salut. Am inceput sa fac un site de la 0. Pentru inceput nu ma complic, am facut doar schema site-ului fiind:
As vrea sa lucrez cu variabilile astfel, incat sa nu lucrez cu echo.... Ci sa definesc o variabila
Cod: Selectaţi tot
<html>
<head>
<title>{$SITENAME}</title>
</head>
<body>
<div class="wrapper">
<div class="content">
<div class="header">
<div class="logopart">
<img src="{$LOGOSRC}" />
<br />
<h2>{$SITETITLE}</h2>
<br />
<p>{$SITEDESC}</p>
</div>
<div class="navpart">
<h3>{$NAVBARTITLE}</h3>
<br />
<ul>
<li><a href="{$HOME_LINK}">{$HOME_TXT}</a></li>
<li><a href="{$FAQ_LINK}">{$FAQ_TXT}</a></li>
<li><a href="{$SEARCH_LINK}">{$SEARCH_TXT}</a></li>
<li><a href="{$MEMBERS_LINK}">{$MEMBERS_TXT}</a></li>
<li><a href="{$PROFILE_LINK}">{$PROFILE_TXT}</a></li>
<li><a href="{$PM_LINK}">{$PM_TXT}</a></li>
<li><a href="{$LOGOUT_LINK}">{$LOGOUT_TXT}</a></li>
<li><a href="{$REGISTER_LINK}">{$REGISTER_TXT}</a></li>
<li><a href="{$LOGIN_LINK}">{$LOGIN_TXT}</a></li>
</ul>
</div>
</div>
<div class="page-body">
<div>
<div class="footer">
</div>
</div>
</div>
</body>
</html>