How to add new key value in an array php?

  • 0

$arrayname[key]=value;

Sample:

$order_statuses[“wc-shipped”]=”shipped”;

$arrayname[key]=value; Sample: $order_statuses[“wc-shipped”]=”shipped”;

$arrayname[key]=value; Sample: $order_statuses[“wc-shipped”]=”shipped”;