Have array $data with keys like checkout_en, checkout_ru and have var $lang with two variants ru and en.
How can i make smht like this $data['checkout_$lang'] to make key checkout_en or checkout_ru depends on $lang var value.
Thank you!
my code
$msg = '"buttons": [
{
"block_names": ["'.$settings['checkout_block_name'].'"],
"type":"show_block",
"title":"'.$settings["checkout_$settings['user_lang']"].'"
}';
$data['checkout_' . $lang]$data["checkout_$lang"]Note use of double quotes, not single as you have in the question.