Jump to content

Recommended Posts

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)

Link to comment
https://forums.phpfreaks.com/topic/208505-how-to-manipulate-array-data-in-smarty/
Share on other sites

Hi Friend,

  Any way I take the solution in some other way. 

Friend I have a Doubt Regarding Queries, that means

I have a Table named : TEST in mysql.

it has some fields like  : mobi_deleted,pub_deleted,pdf_deleted ....

 

according to operation any one of field is updated ....

in my php i got a variable , $var  , it's  value may be mobi, pub or pdf....

 

Do I can Write a query like:

 

  UPDATE TEST SET {$var}_deleted = 0;

 

  is this Work properly.... Waoting for ur valuable Reply...

 

Bye Anes

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.