<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1018846" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1018846</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/php-template#comment-1111402</link>
    <description> &lt;p&gt;Re-design $t-&amp;gt;p() to return a string rather than print.... now you can nest template files.&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt; &lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;FINAL &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;PHASE PHP NEWS PRO&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;**************\&quot;,\&quot;*********\&quot;,\&quot;****************\&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die(\&quot;Couldn&#039;t execute query: \&quot; . mysql_error());&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_select_db(\&quot;blah\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die(\&quot;Couldn&#039;t execute query: \&quot; . mysql_error());&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;SELECT id, title, author, date, body FROM n_main ORDER BY id DESC\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql_result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or die(\&quot;Couldn&#039;t execute query: \&quot; . mysql_error());&lt;br /&gt;&lt;br /&gt;include \&quot;inc/template.inc\&quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = new Template(\&quot;temp/\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$detail_lines&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;\&quot;;&lt;br /&gt;&lt;br /&gt;while (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_fetch_array (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql_result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$title&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;title\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$author&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;author\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$date&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;date\&quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$body&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;body\&quot;];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Sets the 2nd template repeat.tpl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;WholeHandle\&quot;, \&quot;repeat.tpl\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;title\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$title&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;author\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$author&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;date\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$date&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;body\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$body&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;parse&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;FinalOutput\&quot;, \&quot;WholeHandle\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$detail_lines&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;FinalOutput\&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Sets the first template news.tpl&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;Handle\&quot;, \&quot;news.tpl\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;some_color\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$my_color&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;set_var&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;detail_lines\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$detail_lines&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;parse&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;Output\&quot;, \&quot;Handle\&quot;);&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$t&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;(\&quot;Output\&quot;);&lt;br /&gt;&lt;br /&gt;mysql_free_result(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql_result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;mysql_close(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;############################## news.tpl ######################&lt;br /&gt;&lt;br /&gt;&amp;lt;table width=&amp;quot;750&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;TR&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;Title&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;Author&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;Date&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;Body&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;{detail_lines}&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;############################## Repeat.tpl ####################&lt;br /&gt;&lt;br /&gt;&amp;lt;TR&amp;gt;&lt;br /&gt;&amp;lt;th align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;{title}&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;{author}&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;{date}&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;TH align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;{body}&amp;lt;/TH&amp;gt;&lt;br /&gt;&amp;lt;/TR&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Tue, 16 Jul 2002 03:06:27 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1111402 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/php-template#comment-1111398</link>
    <description> &lt;p&gt;news.tmpl should have the table tags, not the repeating template&lt;/p&gt;
 </description>
     <pubDate>Tue, 16 Jul 2002 00:16:29 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1111398 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/php-template#comment-1111397</link>
    <description> &lt;p&gt;If I do that then the code will look like this..&lt;/p&gt;
&lt;p&gt;Title&lt;br /&gt;
Author&lt;br /&gt;
Date&lt;br /&gt;
Body &lt;/p&gt;
&lt;p&gt;{title}&lt;br /&gt;
{author}&lt;br /&gt;
{date}&lt;br /&gt;
{body} &lt;/p&gt;
&lt;p&gt;Now I may be wrong but that&#039;s not proper html coding or is it?&lt;/p&gt;
 </description>
     <pubDate>Tue, 16 Jul 2002 00:01:42 +0000</pubDate>
 <dc:creator>venom</dc:creator>
 <guid isPermaLink="false">comment 1111397 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/php-template#comment-1111394</link>
    <description> &lt;p&gt;Repeat.tmp shouldn&#039;t include the table tags:&lt;/p&gt;
&lt;p&gt;{title}&lt;br /&gt;
{author}&lt;br /&gt;
{date}&lt;br /&gt;
{body}&lt;/p&gt;
 </description>
     <pubDate>Mon, 15 Jul 2002 23:37:46 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1111394 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
