我有一個數組,我需要改變數組的格式。產品數組不包含客戶資訊。
P粉141455512
2023-07-27 18:37:40
<p><br /></p>
<pre class="brush:php;toolbar:false;">Array
(
[0] => Array
(
[customer_name] => Gaurav
[company] => ABC Company
[gstin] => GSTIN Number
[address] => Seller Address
[mobile_no] => 9527136311
[email_id] => seller@gmail.com
[invoice_date] => 26.07.2023
[expiry_date] => 27.07.2023
[amount] => 400
[vendor_name] => Manoj
[vendor_email_id] => grv1gujar@gmail.com
[vendor_mobile_no] => 8169588057
[vendor_gstin] => GSTIN Number
[vendor_address] => Vendor Address
)
[1] => Array
(
[name] => Product1
[description] => Product1
[price] => 50
[quantity] => 4
[tax_percentage] => 12
)
[2] => Array
(
[name] => Product2
[description] => Product2
[price] => 25
[quantity] => 4
[tax_percentage] => 5
)
[3] => Array
(
[name] => Product3
[description] => Product3
[price] => 10
[quantity] => 10
[tax_percentage] => 8
)
[4] => Array
(
[customer_name] => Swapnil
[company] => XYZ Company
[gstin] => GSTIN Number
[address] => Seller Address
[mobile_no] => 9527136311
[email_id] => seller@gmail.com
[invoice_date] => 26.07.2023
[expiry_date] => 27.07.2023
[amount] => 200
[vendor_name] => Anoop
[vendor_email_id] => grv1gujar@gmail.com
[vendor_mobile_no] => 8169588057
[vendor_gstin] => GSTIN Number
[vendor_address] => Vendor Address
)
[5] => Array
(
[name] => ABC
[description] => ABC
[price] => 100
[quantity] => 2
[tax_percentage] => 12
)
[6] => Array
(
[customer_name] => Uday
[company] => PQR Company
[gstin] => GSTIN Number
[address] => Seller Address
[mobile_no] => 9527136311
[email_id] => seller@gmail.com
[invoice_date] => 26.07.2023
[expiry_date] => 27.07.2023
[amount] => 250
[vendor_name] => Virat
[vendor_email_id] => grv1gujar@gmail.com
[vendor_mobile_no] => 8169588057
[vendor_gstin] => GSTIN Number
[vendor_address] => Vendor Address
)
[7] => Array
(
[name] => Pen
[description] => Pen
[price] => 75
[quantity] => 2
[tax_percentage] => 12
)
[8] => Array
(
[name] => Pencil
[description] => Pencil
[price] => 20
[quantity] => 5
[tax_percentage] => 8
)
)</pre>
<p><br /></p>
你能解釋一下你想要做什麼嗎?請不要隨意貼上一個var_dump。