skip to Main Content

sort multi dimension array in php

PHP Format : $salesData["suppliers"][$supplierkey]['sales'][$salesPeriod]['sales'] I want to sort (desc): The key $salesData["suppliers"][$supplierkey] by the numerical value populated in $salesData["suppliers"][$supplierkey]['sales'][0]['cost'] So the following example: $salesData["suppliers"][Dong] $salesData["suppliers"][Ding] Would be changed to: $salesData["suppliers"][Ding] $salesData["suppliers"][Dong] Because $salesData["suppliers"][Ding][sales][0][cost] = 231.0600 $salesData["suppliers"][Dong][sales][0][cost] = 92.8900 Is it…

VIEW QUESTION

Undefined array key in PHP to database

can someone help me by seeing what is wrong with the program I created? Warning: Undefined array key "pertemuan" in D:filexampphtdocsuts_nimkoneksi.php on line 25 Fatal error: Uncaught TypeError: Unsupported operand types: string / string in D:Filexampphtdocsuts_nimkoneksi.php:27 Stack trace: #0 D:Filexampphtdocsuts_nimadd_data.php(7):…

VIEW QUESTION
Back To Top
Search