FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » error message I don understand
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: error message I don understand [message #174894 is a reply to message #174879] Sat, 16 July 2011 19:28 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Fri, 15 Jul 2011 14:38:28 +0000, liebling(dot)kreuzberg(at)gmail(dot)com wrote:


> I'm doing some php programming on my own webserver.
>
> I get the error message: PHP Fatal error: Can't use function return
> value in write context in line 69
>
> This is line 69: if (mysqli_num_rows($sDBResultaat) = 1 )
>
> Either I don see what I'm doing wrong or I interpret the message wrong.
> Either way I don't understand, can somebody point me the right way?

Consider:

<?php

function x()
{
return 5;
}

x() = 1;

?>

although x() gives the value 5, it is not a variable that can be set, and
so you can not assign (or write) a value (such as 1) to it.

The php error message is saying that you can't assign (or write) a value
to a function call, or in other words, the return value of a function
call is read_only data.

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ouion Movement, Roun Time (Floating Point Time)
Next Topic: [MEMCACHED] Is there a way to get the expiration of a key?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 04:05:53 GMT 2024

Total time taken to generate the page: 0.04574 seconds