Q: This creature can change colour to blend in with its surroundings. What is its name ?
A: Chameleon
defining variables Q: this creature has tusks made of ivory.
What is its name ?
elephant
Logical operators
Logical AND .. returns true if all conditions are true
1
Logical OR ... Returns true if any condition is true
Logical NOT ... Returns TRUE if the condition is false and vice versa
Logical XOR ... returns TRUE if any of two conditions are true, returns FALSE if BOTH are true
ARRAYS
Todays shopping list
- eye of newt
- wing of bat
- tail of frog
Arrays using FOREACH- eye of newt
- wing of bat
- tail of frog
Grouping form selections with arrays
Select from the following items :
Using ARRAY functions
array keys
Array
array values
Array
eching if array is an array 1 true 0 false
1extracting values into variables
bacon and eggs
original studentsArray
(
[0] => tom
[1] => jill
[2] => harry
)
first student removed using array_shift  Array
(
[0] => jill
[1] => harry
)
last student removed using array_pop   Array
(
[0] => jill
)
adding a student to the end of the list using array_push   Array
(
[0] => jill
[1] => john
)
adding a student to the begining of the list using arrasy_unshift   Array
(
[0] => ronald
[1] => jill
[2] => john
)
br>explode function - seperate string of words into elements
string as it was beforehand... english latin greek spanish
english latin greek spanish
Using arrays with arguement lists and return values
Array