Results 1 to 3 of 3
Thread: XTemplate..PHP
-
05-29-2008, 05:27 AM #1Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,754
XTemplate..PHP
Hi,
I've never used this before and didn't think it would be so awkwad however i'm trying to execute the following from a .html file:
PHP Code:if(row.premium_show == '1')
{
echo '<tr bgcolor="#fdd2b0">';
} else {
echo '<tr>';
}
But I just cannot simply figure out howto get it to use that code within the template, anyone able to help?
-
05-29-2008, 08:38 AM #2Retired Moderator
- Join Date
- Jun 2003
- Location
- Proud She-Geek
- Posts
- 1,723
With most template parsers you would not have to use echo statements; part of their job is to allow you to use straight html + template tags in the templates.
Most template parsers allow you to do something like
Code:{if row.result == something} output for when row.result == something {else} output for everything else {/if or endif}
HTH<?php echo "Signature here"; ?>
-
05-29-2008, 09:37 AM #3Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,754
Hi,
Thanks i've tried this:
PHP Code:{if row.premium_show == 1 }
<tr bgcolor="#fdd2b0">
{ else }
<tr>
{/endif}
Don't know if this helps but this is some syntax i've taken from the .html files..
PHP Code:<form action="{PHP._SERVER.PHP_SELF}" method="get">
PHP Code:<option value="{x.value}" {x.selected}>{x.text}</option>