BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
The double equals signs are to test for equality between two variables and/or values. A single equals sign is used for assignment.
Code:
//"set variable1 to 'value'"
$variable1 = "value";
//"if variable1 is 'value' do something()"
if($variable1 == 'value')
{
something();
}
//this is probably not what you want to do:
//"if variable1 is successfully set to 'value' do something()"
if($variable1 = 'value')
{
something();
}
//and this will cause an error - think of it as a sentence fragment
$variable1 == 'value';