How to manipulate array data in smarty

Discussion in 'PHP' started by amskape, Jul 21, 2010.

  1. #1
    Hi Friends,

    I have some data from database Table which must be display as output . I assign the array in PHP page to smarty template....

    The array structure I plan to assign to smarty is :
    Array ( [publisher] => Array ( [0] => pen books [1] => pen books [2] => Jacks books [3] => May books [4] => Ram books ) [title] => Array ( [0] => For Earners [1] => Bol in glance2 [2] => Dummy For Earners [3] => Bol in glance2 [4] => New man ) [isbn] => Array ( [0] => 8709873689098 [1] => 5495736309876 [2] => 9789873689093 [3] => 9785495789760 [4] => 9781119087441 ) )

    I need to get the display output in HTML as :

    display output
    ================
    publisher title isbn
    ===== === =======
    pen books For Earners 8709873689098

    jacks books Bol in glance2 5495736309876

    May books Dummy For Earners 9789873689093

    Ram books New man 9781119087441

    Please give a method to do the things in smarty. I need a solution using foreach or section or both in smarty . Please Give a method to accomplish same in smarty ....

    Thanks in Advance ...

    Regards
    Anes P.A (anes(dot)pa(at)gmail(dot)com) or(anespa(at)admod(dot)com)
     
    amskape, Jul 21, 2010 IP