...

View Full Version : Anyone familiar the Xtemplate engine?



ptmuldoon
01-18-2008, 07:36 PM
I'm experimenting with the Xtemplate template engine, and can't figure out how to convert a date/time field to show correctly.

I have a query that will take each row, and make an array of each row. One the fields is a "time" field.



$sql = "SELECT * FROM game_info WHERE gid > 1 ";
$result = mysql_query($sql);

while ($row = mysql_fetch_assoc($result)) {
$pdata[] = $row;
$time = date("m/d - H:i", $pdata['time']);
}

And in my Xtemplate, I have the following, The gid and name both appear correctly, but I always get the time of "1199566614", and not the converted time



<tr>
<td>{GAME.gid}</td>
<td>{GAME.name}</td>
<td>Players</td>
<td>Info</td>
<td>{GAME.time}</td>

</tr>

Or as I read more. Is using a template engine a bad idea?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum