Download presentation
Presentation is loading. Please wait.
1
Web Systems Development (CSC-215)
Lecture 3: Introducing PHP Wednesday 7th February 2018
2
Functions User defined Inbuilt PHP function
An integer representation of time using Unix timestamp convention.
3
PHP Manual Reference
7
Using the function
9
Get date from 17 days ago
11
Variable Scope Local variables, e.g., arguments to a function
12
Out of scope
14
Re-arranged
16
Or passed as argument Longdate modified
18
Global Variables Avoid unless absolutely necessary because its bad programming practice.
19
Static Variables
21
Static Variables Only predetermined values allowed
22
Expressions
23
Booleans TRUE & FALSE
26
Literals and Variables
27
Expressions and Statements
28
Operators
29
Precedence
30
Relational Operators
31
Identity Operator Only 1 is printed
32
Not identical Only 2 is printed
33
Conditionals
34
Conditionals
35
Conditionals
36
Switch Default and break, as in C++
37
Loops
38
Loops
39
Loops
40
Class Activity Print the current date and time as per the given formatting, and then print 9 future date and time values in 12 hour increments. Maintain HTML formatting as well (h1 and p tags used). Set the correct time zone for WampServer if needed.
41
Lecture content adapted from chapters 2 & 3 of Learning PHP, MySQL, JavaScript, CSS & HTML5, 3rd Edition, by Robin Nixon.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.