KEMBAR78
PHP Lecture 1 - String, Constants, Arrays, Operators | PPTX
WEB DEVELOPMENT
PHP
PRESENTATORS
MD. AL-MAMUN SARKAR
PHP
String
Constants
1
2
Arrays3
Operators4
String
str_word_count("Hello world!")2
strrev("Hello world!")3
str_replace("world", "Dolly", "Hello world!")4
strpos("Hello world!", "world")5
strlen("Hello world!")1
Constant
define(name, value, case-insensitive)
2
Operators
Assignment operators2
Comparison operators3
Increment/Decrement operators4
Logical operators5
Arithmetic operators1
String operators6
Arithmetic operators
Assignment operators
Comparison operators
Increment/Decrement
Logical operators
String operators
Array
• Indexed arrays - Arrays with a numeric index
• Associative arrays - Arrays with named keys
• Multidimensional arrays - Arrays containing one or more arrays
Array function
• sort() - sort arrays in ascending order
• rsort() - sort arrays in descending order
• asort() - sort associative arrays in ascending order, according to the value
• ksort() - sort associative arrays in ascending order, according to the key
• arsort() - sort associative arrays in descending order, according to the value
• krsort() - sort associative arrays in descending order, according to the key
Superglobals
• $GLOBALS
• $_SERVER
• $_REQUEST
• $_POST
• $_GET
• $_FILES
• $_ENV
• $_COOKIE
• $_SESSION
QUESTION
?
THANK
YOU

PHP Lecture 1 - String, Constants, Arrays, Operators