473,385 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to manipulate array data in smarty

56
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
Jul 22 '10 #1
2 2357
dlite922
1,584 Expert 1GB
Do you know how smarty works?

I cannot just write the code for you. If you want to learn, you've come to the right place.

Have a look at the smarty manual:
Foreach: http://www.smarty.net/manual/en/lang...on.foreach.php

Section: http://www.smarty.net/manual/en/lang...on.section.php

any real questions?

Dan
Jul 22 '10 #2
amskape
56
I got the solution , Thanks to give link for ... I will reach you when any Queries Regarding Smarty. Thanks for ur support

bye anes
Jul 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Reed Law | last post by:
I have the exact same data in two arrays, but only the array created like so will work: $spaw_imglibs = array( array( 'value' => '/youth/pics/Member pics/', 'text' => 'Member pics', ),...
4
by: Michael Whittaker | last post by:
Hello! I have a problem with my php script. The script's task is to search an IP-Database with ranges as entries and find, in which range the entered IP is. OK, I've queried the MySQL-Results...
4
by: Roshawn | last post by:
Hi, I have a Repeater control that is databound to an array. This array contains data regarding products (ie. Name, Price, Manufacturer, etc.). I am wondering how do I display data in a...
3
by: Doggie | last post by:
Hi, I am working on JS navigation for my web page. Contents of 3 subpages are located in the array as shown below. When certain key is pressed on the page, div is filled with data taken from one...
8
by: iluvatar | last post by:
Hi all. How can I initialize an array data member in the "faster" way? For example, suppose I have a class like class Example{ private: double array; public: Example(const double & val0,...
2
by: FatalCross | last post by:
How Can I manipulate the data from Database???? any one can help me pls my database is ms access
0
by: fariba123 | last post by:
hi i have designed 2 web pages using smarty. in the first page a list of records has been shown with a link in the invoice no. whenever one clicks the link the details according to the invoice no...
4
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
3
by: dondigital | last post by:
I'm trying to figure out the best approach to grab data from an array. So heres the deal. I have byte array called curveData filled will hex bytes that I've downloaded from a unit under test....
5
by: veekoul | last post by:
Hi All, I have a sql which fetches large number of records and then i use the one column value and do a select on other table in other DB. I want to do it on the fly as i dont want to use any temp...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.