Re: good examples of displaying a **2** dim array as a table
| From: | Dennis Gearon | Date: | Mon, 28 Apr 2003 19:08:15 +0000 |
| Subject: | Re: good examples of displaying a **2** dim array as a table | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9408@lists.php.net to get a copy of this message | ||
Well, additional searching **DID** find an answer. I searched the archives already, I SWEAR! :-)
http://marc.theaimsgroup.com/?l=smarty-general&m=104486324827859&w=2
Dennis Gearon wrote:
Please CC me (I'm on digest) and also to the list. QUESTION ---------- If I have: (in php file) $arr= array(array( 12345,'george','harrison'), array( 23456,'ringo','starry')); and I want a table like so: <table 'other attributes'><tr 'other attributes'> <td>12345</td> <td>george</td> <td>harrison</td> </tr> <tr> <td>23456</td> <td>ringo</td> <td>starr</td> </tr></table> and I just want to do: $smarty->assign( 'arr', $arr ); $smarty->render ( I forget the syntax); how would I do it?