I need to insert the parameter $reg into the string but I can't do it
public function param($apikey, $plant_id, $reg){
$http = new Client();
$response = $http->get('https',[
'apikey'=> $apikey,
'plant_id'=> $plant_id,
'dev_cmd'=>'[{"mod":5,"reg":$reg}]']);
it is seen as a term of the string while it is a declared variable