PHP, Creating a dynamic variable

Your own solution works I guess (double $$) but usually you do it this way:

$quantity['type'] = 1;
${'message' . $quantity['type']} = 'hello';
echo $message1; // hello

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)