For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > October 2006 > Formatting my table on Smarty..









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Formatting my table on Smarty..
Louie Miranda

2006-10-30, 7:33 pm

I want to format my table on smarty..
The data i currenltly have is..

12345678910
and with smarty and php

while($viewFonts_01->fetchInto($_fetchmode1)) {
> $_dataDS1[] = $_fetchmode1;
> }
> $viewFonts_01->free();
> $font_front = $_dataDS1;
> $smarty->assign('font_front', $font_front);
>


Displaying thru smarty..

{foreach from=$font_back item=entry}
> » <a href="dataentry.php
> ?font_front={$entry.0}&paperprintoption={$paperprintoption}&language={$language}&rpcSession={$rpcSession}">
> {$entry.2} ({$entry.3} only characters)
> </a><br>
> {/foreach}
>


As you can see, it only displays one straight vertical chunks of data..

How can i format on smarty to do this?

12345678910
I have my temp code which do this on plain PHP alone, but i dont know how to
make this work on smarty with two <td> sets...

$skip = 2;
> echo '<table border="1">';
> for ($i = 1; $i <= 10; $i += $skip) {
> echo '<tr>';
> echo '<td>' . $i . '</td>';
> echo '<td>' . ($i + 1) . '</td>';
> echo '</tr>';
> }
> echo '</table>';
>


Please help :(
--
Louie Miranda (lmiranda@gmail.com)
http://www.axishift.com

//JSM-W

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com