I think what you want there is =
, not =>
.
Update one Array from another in a Function ('T_DOUBLE_ARROW' error)
https://stackoverflow.com/questions/22162336
Question
I'm getting a (T_DOUBLE_ARROW)
error with the below function.
I'm trying to update the field booking_number
from an array called $details
. This is being updated from the contents of another array based on two arguments.
I get the feeling that it's something small and stupid. Think I've been staring at the code for too many hours!
Can anyone help? Would be much appreciated!
function addBookings($details, $bookings, $fulldate){
foreach($bookings as $booking){
if(($booking['class_id'] == $details['id']) && ($booking['class_date'] == $fulldate)) {
$details['booking_number'] => $booking['booking_number'];
}
}
return $details;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow