Php/smarty 2 Assist W Snippet
Hi
I require a programmer please to carry out the below.
I’m using a smarty script to display some grids. I’ve tinkered around with the script to try and get the grids displayed in specific cells in a table but with no joy.
Below is the code which generates the grids.
<table cellspacing=”0″ cellpadding=”0″ width=”1000″ align=”center” border=”0″>
{foreach item=grids from=$rows}
<tr>
{foreach item=grid from=$grids}
<td>
<img src=”{$grid->url()|escape}” usemap=”#grid_{$grid->id}” width=”{$grid->width|escape}” height=”{$grid->height|escape}” alt=”” border=”0″ /></div><div style=”clear: both”></div>
</td>
{/foreach}
</tr>
{/foreach}
</table>
{foreach item=rid_id from=$rids_ids}
<div id=”region-hint-{$rid_id}” class=”hidde”><img src=”show_image.php?rid={$rid_id}” /></div>
{/foreach}
I would like the grids generated to be displayed in specific cells i.e.
<table width=”1000″ border=”1″>
<tr>
<td width=”200″>grid id=2 to be displayed here</td>
<td width=”66″> </td>
<td width=”200″>grid id=3 to be displayed here</td>
<td width=”66″> </td>
<td width=”200″>grid id=4 to be displayed here</td>
<td width=”68″> </td>
<td width=”200″>grid id=5 to be displayed here</td>
</tr>
<tr>
<td colspan=”7″>grid id=1 to be displayed here</td
</tr>
</table>
To assist, below is how the php generates the array for the grids;
// arrange grids into rows/columns
$rows = array();
while (!empty($grids)) {
$row = array();
for ($i = 0; $i < $c; $i++) {
if (!empty($grids))
$row[] = array_shift($grids);
}
$rows[] = $row;
}
If you require anymore info then please get back to me. Awaiting your offers.
Thank you