Not sure why im getting this error in my logs.
PHP Notice: Undefined variable: customerName
here is line 74:
$arrOrderDetails = $purchaseOrder->load($customerName);
this im returning “$customerName” from the instance of another class
here is that code:
public function load($customerName){
$orderDetails = array();
//Adding first order detail
$orderData = array
('order_id' => 1,
'customer_name' => 'Lancaster Landscapes',
'description' => 'Golf Balls-Titlest DT Solo',
'quantity' => 13,
'price' => 33,
'total' => 432.25
);
$orderDetail = new OrderDetail($orderData);
$array_push($orderDetails, 1, $orderDetail);
return $orderDetails;
}
I will still be adding more elements to the array.
Any suggestions?
Its just a notice, aka wont break the code, however if you want to clean it up , prior to $customername being assigned you include
That notice should go away