I am trying to echo a string as a variable ($account_pk) but it just output's "$api_key1" and not the output of the variable, the 1 in $api_key1 is set when $key_num equals to 1.
Part of the code:
$key_num = $_POST['keynum'];
$account_pk = '$api_key' . $key_num;
echo $account_pk;
UPDATE:
There is not a variable called $api_key I need $account_pk to combine the string $api_key with the variable $key_num then find a way to echo the real variable $api_key1