I have this code:
$set = "argument";
function imp_set($set){
$sql=mysql_query("SELECT $set FROM settings WHERE id=1");
if($sql){
$res=mysql_result($sql,0);
}
$set = $res;
}
I want to echo("$argument"); to display $res value.
Thanks.
With that said, this is an odd request, and you’re also not returning anything from the function. Very few people use php “variable variables” because they are confusing and rarely worth the trouble, considering the obfuscation they introduce.