Hi,

I am working on LiveDocx document generation.
When dealing with arrays, it is sometimes necessary to format the data to be 
printed.
For instance, consider this data:

$data = array(
  0 => array(
    'title' => 'item 1',
    'width' => 65.00,
    'height' => 54.00,
    'purchase_price' => 29.95
 ),
 ...
);

I would like to print it this way:
title   dim. W x H    price
-------------------------------------
item 1  65 x 54 cm    29,95

The width and height should be converted to integer and the decimal separator should accomodate to locale.

What is the best practice to do it?

Best regards
--
Guillaume ORIOL
Software engineer
Technema

Reply via email to