Please enable JavaScript.
Coggle requires JavaScript to display documents.
PHP (Syntex (Variable (Naming Rules (case sensative, begin with letter / _…
PHP
Syntex
Variable
How to make
$var_name =value
Naming Rules
case sensative
begin with letter / _
no space but _ alowed
what
store and manipulate data
how
Function
echo
Example
echo $variable name
echo "hello world"
Output text
print
Settype ()
It's change type of a variable
Array
3 kind
Indexed
Associative
Multi dimensional
comment
//
/
/
Data type
8 kind
String
"string"
বর্ণ গুচ্ছ
example
$stringnam="stringvalue"
char array
int
5,10,6
float
5.25
boolean
True, false
array
object
rsc
null
null
Operator
constant
opposite of variable
define keyword
Library function
String
"string "or 'string'
Control statement
Decision
if
if( expression )
{ block
}
if else
swtich
switch (n) {
case value1;
block;
break;
case value2:
block2;
break;
default;
}
Loop
While
while () { }
for
for(var=0;var<5;var++){}
do
do { } while ()
foreach
foreach(array as value){}
What
Server side programming language
Scipting language
Hypertext preprocessor
Why
Cross platform
opensource and free
Compatible with any modern server
code example
<? PHP ......... ?>
<script> </script>
Purpose
To make dynamic website quickly