Table help needed

From: Date: Mon, 01 Dec 2003 21:42:13 +0000
Subject: Table help needed
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10612@lists.php.net to get a copy of this message
Hello everyone I've been trying to do this for quite a long time now and haven't been able to get it right. I'd really appreciate any help you can give me. I get the following from a SQL query: $smarty->assign('servmenu', array( array('navmenu_name' => 'Service 1', array( array('code' => 1, 'name' => subservice 1.1), array('code' => 2, 'name' => subservice 1.2), array('code' => 3, 'name' => subservice 1.3) ), array('navmenu_name' => 'Service 2', array( array('code' => 1, 'name' => subservice 2.1), array('code' => 2, 'name' => subservice 2.2), array('code' => 3, 'name' => subservice 2.3) ), array('navmenu_name' => 'Service 3', array( array('code' => 1, 'name' => subservice 3.1), array('code' => 2, 'name' => subservice 3.2), array('code' => 3, 'name' => subservice 3.3) ) ) ); And I want to generate the following HTML code from that data: <table width="100%" border="1" cellspacing="0"> <tr align="center"> <td>Service 1</td> <td>Service 2</td> <td>Service 3</td> </tr> <tr> <td>subservice 1.1</td> <td>subservice 2.1</td> <td>subservice 3.1</td> </tr> <tr> <td>subservice 1.2</td> <td>subservice 2.2</td> <td>subservice 3.2</td> </tr> <tr> <td>subservice 1.3</td> <td>subservice 2.3</td> <td>subservice 3.3</td> </tr> </table> How can I do it with Smarty? Any help will be higly appreciated. Thanks a lot. *********************************** Wilmar Pérez Network Administrator Library System University of Antioquia Tel: ++57(4)210 5962 Fax: ++57(4)211 6939 Calle 67 No 53-108, Bloque 8 Medellín - Colombia http://biblioteca.udea.edu.co ***********************************

« previous php.smarty.general (#10612) next »