i have an array like this,
Array
(
[0] => 1 CS pizza Rs. 400
[1] => 1 Pepperoni Pizza Rs. 300
[2] => 1 Creamy Tomato Soup Rs. 100
[3] => 1 Veg Triple Singapore
Noodles Rs. 200
[4] => 1 Mix Triple Noodles Rs. 210
[5] => 1 Veg Triple Schezwan
Noodles Rs. 180
[6] => 1 Veg Triple Singapore
Noodles Rs. 200
[7] => 1 New POS Item Rs. 100
)
i want to format the data to like this using php ,
Array
(
[0] => 1 CS pizza Rs. 400
[1] => 1 Pepperoni Pizza Rs. 300
[2] => 1 Creamy Tomato Soup Rs. 100
[3] => 1 Veg Triple Singapore
Noodles Rs. 200
[4] => 1 Mix Triple Noodles Rs. 210
[5] => 1 Veg Triple Schezwan
Noodles Rs. 180
[6] => 1 Veg Triple Singapore
Noodles Rs. 200
[7] => 1 New POS Item Rs. 100
)
i am using this code to do it like this , but i am unable to this,
$value['quantity']." ".wordwrap(str_pad($value['itemname'],25), 25,"\n")." "."Rs. ".$value['basePrice']."\n"
How to proceed , can anyone help on this.
ok here i got my answer,