mohammad abas mohammad abas - 1 year ago 75
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download