-2

Below is my code. please help!!!

for ($i = 0; $i < count($product_ref); $i++) {
    $final[$i] = array(
        $i = > array(
            'producer' = > $producer_name[$i],
            'client' = > $client_name[$i],
            'provider' = > $product_provider[$i],
            'product' = > $product_name[$i],
            'status' = > $current_status[$i],
            'planno' = > $plan_no[$i],
            'currency' = > $plancurrency[$i],
            'premium' = > $premium[$i],
            'frequency' = > $paymentfrequency[$i]
        )
    );
}
xdazz
  • 158,678
  • 38
  • 247
  • 274

1 Answers1

0

The array $final looks like $final->$i->$i->data so you do not need the first array($i => ...).

Then this post should help you sort the array.

Community
  • 1
  • 1
AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66