Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Systems Development (CSC-215)

Similar presentations


Presentation on theme: "Web Systems Development (CSC-215)"— Presentation transcript:

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

4

5

6

7 Using the function

8

9 Get date from 17 days ago

10

11 Variable Scope Local variables, e.g., arguments to a function

12 Out of scope

13

14 Re-arranged

15

16 Or passed as argument Longdate modified

17

18 Global Variables Avoid unless absolutely necessary because its bad programming practice.

19 Static Variables

20

21 Static Variables Only predetermined values allowed

22 Expressions

23 Booleans TRUE & FALSE

24

25

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.


Download ppt "Web Systems Development (CSC-215)"

Similar presentations


Ads by Google