Hi,
I have little bit idea about array, but this code i feel some what complicated for me. can any one help me in this please, - $total = number_format((float)strip_tags($order->totals[4][text]), 2,',','');
Can anyone explain me how values will be present inside that totals[4][text]. actually $order->totals[4][text].what it mean here.
Please can any one help me in this please.
Regards
magesh
2 1411 $order->totals[4][text] accesses a property of a class of which $order is an instance. That property is a multidimensional array.
If you would like to elaborate on your problem, then I could help more.
@Markus
Array table: - $totals_query = xtc_db_query("select title, text from " .TABLE_ORDERS_TOTAL . " where orders_id = '" . xtc_db_input($order_id) . "' order by sort_order");
-
while ($totals = xtc_db_fetch_array($totals_query)) {
-
$this->totals[] = array('title' => $totals['title'],'text' => $totals['text']);
-
/****************************************/
-
-
$total = number_format((float)strip_tags($order->totals[4][text]), 2,',','');
for example title will show sub total, main total etc.. in text field it will show the amount like 1234,89 and 345,32 etc...,
but i ma not getting the number format as i mentioned in the number format function it simply showing the value as say 1234.43 instead of 1234,43.
what will be the problem, can anyone explain this please.
Regards
magesh
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Harry Overs |
last post by:
My program needs to take a pointer to BYTE array (unsigned char*) and
convert it into a STL list so that each BYTE in the array has its own
element in the list, i.e. if the array has hundred bytes...
|
by: aemazing |
last post by:
hello, im new to the forum and i wanted to help with my c++ program.
the teacher wants us to design a progrm that would keep track of
airplanes awaitin landing at an airport. the program will...
|
by: aemazing |
last post by:
i've been tryin to do the following -
-Add a new flight number to the end of the queue (got it done)
-LAnd the plane at the front of the queue - problems wit it-
-display the queue - got it done...
|
by: Peter B. Steiger |
last post by:
The latest project in my ongoing quest to evolve my brain from Pascal to C
is a simple word game that involves stringing together random lists of
words. In the Pascal version the whole array was...
|
by: Tom Jastrzebski |
last post by:
Hello,
I was just testing VB.Net on Framework.Net 2.0 performance when I run into
the this problem.
This trivial code attached below executed hundreds, if not thousand times
faster in VB 6.0...
|
by: cyrvb |
last post by:
Hello,
I'm a very very newbie in C# I did start 2 days ago, I get Visual
Stuido 2005 C#
I try to understand how to manage the arrays
I did write this
|
by: javuchi |
last post by:
I just want to share some code with you, and have some comments and
improvements if you want.
This header file allocates and add and delete items of any kind of data
from a very fast array:
...
|
by: StevenChiasson |
last post by:
For the record, not a student, just someone attempting to learn C++. Anyway, the problem I'm having right now is the member function detAddress, of object controller.
This is more or less, your...
|
by: Lee Crabtree |
last post by:
This seems inconsistent and more than a little bizarre.
Array.Clear sets all elements of the array to their default values (0,
null, whatever), whereas List<>.Clear removes all items from the...
|
by: Bob Bedford |
last post by:
Hello,
I've an array of array(1,2,3,4). I'd like to retrieve the values in 3 and 4
giving the values 1 and 2. How can I do that, how to search in an array of
array ? in short, how to write the...
|
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...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |