Mixing variables into an array when inserting values
You are creating a string …. $sql=””ft_num”=>””.$ticket[‘number’].'”,”booking_id”=>”‘.$ticket[‘booking’].'”‘; … but expecting it to operate as an array… array( $sql, ‘event_id’ => $event[‘id’], This has nothing to do with how WordPress does anything. This is pure PHP. You have literally created this: array( [] => “ft_num”=>”‘.$ticket[‘number’].'”,”booking_id”=>”‘.$ticket[‘booking’].'”, ‘event_id’ => $event[‘id’], You need to build the array dynamically. $dynargs … Read more