mohammad abas mohammad abas - 8 months ago 41
PHP Question

Can't assign echo statement

I have this code:

$value = echo $row['balance'];

And the mistake is in
$value = echo $row['balance'];
and I don't know how to fix it.


Your assignment is wrong:

  $value = echo $row['balance']; // no need to use echo

Remove the echo:

  $value = $row['balance']; 

Which would have thrown you a syntax error using error reporting.