Replace whole array inside a session.
I have session called cart like bellow
array:2 [▼
0 => array:5 [▼
"productId" => "1"
"productTypeId" => "5"
"productTypeName" => "Printed Wristbands"
"productTypeSizeName" => "1/2 Inch"
"productName" => "1/2 Inch Printed Wristbands"
]
1 => array:5 [▼
"productId" => "2"
"productTypeId" => "7"
"productTypeName" => "Dual Layer Wristbands"
"productTypeSizeName" => "1/2 Inch"
"productName" => "1/2 Inch Dual Layer Wristbands"
]
]
Now i want to replace index 1 with new array like
array:5 [▼
"productId" => "3"
"productTypeId" => "8"
"productTypeName" => "Embossed Wristbands"
"productTypeSizeName" => "1/2 Inch"
"productName" => "1/2 Inch Embossed Wristbands"
]
how can i do that?
Please or to participate in this conversation.