Re: $sring = ARRAY?

From: Date: Sun, 29 Feb 2004 06:27:59 +0000
Subject: Re: $sring = ARRAY?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-179120@lists.php.net to get a copy of this message
Axiom wrote:
Why is it that in the following code that $value comes back with just the word ‘ARRAY’ instead of the actual result? if (($value = mysql_fetch_row($result)) AND ($value == $username)) {
        echo "You are authenticated";
} else {
        echo "Your username or password is incorrect";
}
Read http://www.php.net/mysql-fetch-row -- especially the part where it talks about what the function returns. Hint -- its at the very top of the page. Another hint -- the function returns whatever it is you typed in ALL CAPS in your email. And the final hint -- the answer to your subject is, no -- you cannot do that. In short, read the manual.

« previous php.general (#179120) next »