PHP - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

PHP

Description:

Red Sox players. Varitek. Papelbon. Pedroia. Numbered list ... sox = array( 'catcher' = 'Varitek', 'closer' = 'Papelbon', 'second_base' = 'Pedroia' ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 29
Provided by: randy99
Category:
Tags: php | red | sox

less

Transcript and Presenter's Notes

Title: PHP


1
PHP
2
Arrays
3
Lists
4
List
Red Sox players Varitek Papelbon Pedroia
5
Numbered list
sox array("Varitek", "Papelbon", "Pedroia")
6
Numbered list
Array
sox0 "Varitek"sox1 "Papelbon"
7
Dictionary list
sox array( "catcher" gt "Varitek",
"closer" gt "Papelbon", second_base" gt
"Pedroia")
8
Dictionary list
Associative array
sox"catcher" "Varitek"sox"closer"
"Papelbon"
9
Working with arraysBuilt-in functions
count(sox) 3empty(sox)
falsearray_push(sox, "Lowell") "Varitek",
"Papelbon", "Pedroia", "Lowell"array_pop(sox)
"Varitek"
10
Working with arraysSorting
sox array("Varitek", "Papelbon", "Pedroia")
sort(sox)
11
Working with arraysSorting
sort(sox)
12
Working with arraysSorting
asort(sox)
13
Functions
f(x) x 1
14
Functions
f(x) x 1 f(2)
15
Functions
f(x) x 1 f(2) 2 1
16
Functions
f(x) x 1 f(2) 2 1 f(2) 3
17
Functions
f(x) x 1
18
Functions
f(x) x 1 function add_one_to(x) x 1
19
Functions
f(x) x 1 function add_one_to(x) x
1 function add_one_to(x) x 1
20
Functions
f(x) x 1 function add_one_to(x) x
1 function add_one_to(x) x 1 function
add_one_to(x) x 1
21
Functions
f(x) x 1 function add_one_to(x) x
1 function add_one_to(x) x 1 function
add_one_to(x) x 1 function add_one_to(x)
return x 1
22
Functions
function add_one_to(x) return x 1
23
Functions
add_one_to(x) return x 1 function
add_one_to(2) return 2 1
24
Functions
add_one_to(x) return x 1 function
add_one_to(2) return 2 1 function
add_one_to(2) return 3
25
Functions
add_one_to(2) 3
26
Functions
function name(parameters) statements
27
Functions Arrays
sox array("Varitek", "Papelbon",
"Pedroia")array_map("strtoupper", sox)
"VARITEK", "PAPELBON", "PEDROIA"
28
Refactoring
Any change to a computer program's code which
improves its readability or simplifies its
structure without changing its results
Write a Comment
User Comments (0)
About PowerShow.com