Hi again... - (Im transferring my emails from gmail to here ) - I've got Gmail on my domain...
Im working with Smarty - & have a template query (code below) ============================ {html_table loop=$myArray cols=4 table_attr='border="1"'} <ul> {foreach from=$myArray key=k item=foo} {if $k >0} <li>'{$k}' {$foo}</li> {/if} {/foreach} </ul> ============================ The top (single line) - Produces a table - Quite good :) - I can alter that.... HOWEVER, I've sorted the array into alphabetical order by value {$foo} The top line (Suggested code) - works fine, however it sorts by KEY, & not by the value... (my PHP script has it sorted how I want) Is there a way to alter the top line - To sort by value first - then display the table ?? Otherwise, I'll have to expand on the bottom code (works fine) - So it stops at the 4th cell - (I want a table) - & then inserts the closing TR and opening TR of next line (doable in PHP - but im very new to templates/smarty...) I know the 2nd code isn't a table (as yet) - But i'll change it.... I can prob do it - but with a lot more code than the above... Ive looked at http://smarty.net/manual/en/language.function.html.table.php but cannot see any sort option... Is this possible ? To create a 4 column table - Sorted data ?