View Single Post
Old 10-28-2011, 08:09 PM  
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by Aric View Post
I'm no expert, but that is wrong? You just assigned a value to $paid, which of course got rid of his PHP notices.

The PHP notices are displayed because $paid has no value set before the conditional.
Yep, $paid = false sets $paid to false.
The warning goes away because it's perfectly legal code, but it's also perfectly useless - it will always be true. To confirm, try this:

$paid = 1;
if ($paid = false) {
echo "oops, wrong answer";
}
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote