Matthews, Marty, Cronan, John. 2010. Dynamic Web Programming: A Beginner's Guide. New York: McGraw Hill.
PHP code to display date
The Date is Now: 2025-01-23
The Date Next Week is: 2025-01-30
The Following Week Date is: 2025-02-06
This is produced by Print
This is produced by Echo
Arguement #1: Echo can take 2 arguments Arguement #2: separated by comma
987654321
html tags can be put within the quote marks eg < br/>
echo "<br /><br /> 987654321 <br /><br />";
987654321
# This is a single line comment
// This is also a single line comment
/* This is a comment
that can span many lines */
print "My name is \"Wendy\""
print "My name is 'Wendy'"
Variable: diff value at diff times; starts with a $ dallar sign followed by descriptive, compound name you give it
e.g $customer_street vs $street
Constant: same value throughout script; UPPERCASE NAMES
Pre-defined Constants: ABSTRACT, AND, ARRAY, AS, BOOL, BREAK, CASE, CATCH, CLASS, CLONE, CONST, CONTINUE, DECLARE, DEFAULT, DO, ECHO, ELSE, ELSEIF, ENDDECLARE, ENDFOR, ENDFOREACH, ENDIF, ENDSWITCH, ENDWHILE, EXTENDS, FALSE, FINAL, FLOAT, FOR, FOREACH, FUNCTION, GLOBAL, GOTO, IF, IMPLEMENTS, INT, INTERFACE, INSTANCEOF, NAMESPACE, NEW, NULL, OBJECT, OR, PRINT, PRIVATE, PROTECTED, PUBLIC, STATIC, STRING, SWITCH, THROW, TR, TURE, USE, VAR, WHILE, XOR.
Assign variable or constant a value
Order of Precedence, if combined in single expression:
(can use parenthesis to get around order)
++, --, !, ~, @, *, /, %, +, -, ., <<, >>, <, <=, >, >=, <>, ==, !=, ===, !==, &, ^, |, &&, ||, =, +=, -=, .=, and, xor, or.