I am learning PHP. I have two variable like this
$user_name = 'abc';
$pass = '12345';
I want use it inside curl string which originally require like this
CURLOPT_POSTFIELDS =>'{
"username_or_email": "abc",
"password": "12345"
}',
I am trying like below
CURLOPT_POSTFIELDS =>'{"username_or_email": '.'"$user_name"'.',"password":'.' "Freelance12"'.'}'
but its not working. Anyone can please help me for solve the issue? Thanks!