Hi,
I have a variable y that is a result of a fetch_assoc command:
$y = @$x->fetch_assoc();
Variable $y contains one field 'foo'. Now I want to echo it, problem is that it doesn't work:
echo "$y['foo']"; //produces a blank plage, because of a syntax error I suppose
echo '$y["foo"]'; //echoes litteraly $y["foo"]
Any solution apart this one?
$bar = $y['foo'];
echo "$bar";
best regards,
Patrick
problem with echoing a fetch_assoc variable
Moderator: General Moderators