Except where otherwise noted, the contents of this document are Copyright 2012 Marty Stepp, Jessica Miller, and Victoria Kirst. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the author's expressed written permission.
http://server/path/file
https://webster.cs.washington.edu/cse190m/quote.php
webster.cs.washington.edu to run the program quote2.php and send back its output
		
		
		
	
	
.html file (static content): server just sends that file.php file (dynamic content): server reads it, runs any script code inside it, then sends result across the network
			There are many other options for server-side languages: Ruby on Rails, JSP, ASP.NET, etc. Why choose PHP?
php.net/functionName in browser Address bar to get docs for any function
		The following contents could go into a file hello.php:
	
<?php print "Hello, world!"; ?>
<?php and ends with ?>
		
	.php page on your local hard drive; you'll either see nothing or see the PHP source code.php file will run the program and send you back its outputprint
	print "text";
print "Hello, World!\n"; print "Escape \"chars\" are the SAME as in Java!\n"; print "You can have line breaks in a string."; print 'A string can use "single-quotes". It\'s cool!';
echo instead of print
			+ - * / % 
			. ++ -- 
			= += -= *= /= %= .=
			
		5 + "7" is 12$name = expression;
$user_name = "PinkHeartLuvr78"; $age = 16; $drinking_age = $age + 5; $this_class_rocks = TRUE;
$, on both declaration and usage# single-line comment // single-line comment /* multi-line comment */
# is also allowed
			# comments instead of //# and will use it in our examplesfor loop
	
for (initialization; condition; update) {
	statements;
}
	
for ($i = 0; $i < 10; $i++) {
	print "$i squared is " . $i * $i . ".\n";
}
if/else statement
if (condition) {
	statements;
} elseif (condition) {
	statements;
} else {
	statements;
}
	elseif keyword is much more common, else if is also supported