Integer
ေပါင္းနႈတ္ေျမွာက္စား ကိစၥေတြအတြက္ အသံုးျပဳတယ္။
Strings
စာေတြ text ေတြအတြက္ အသံုးျပဳတယ္။
$str="Hello World";
Booleans
True or Flase condition ေတြအတြက္ အသံုးျပဳတယ္။
Compound Data Types
အျခား ထပ္မံပါဝင္တဲ့ data types ေတြကေတာ့
Arrays - variable တစ္ခုထက္ ပိုတာေတြကို သိမ္းတယ္။ ေနာက္ပိုင္း Arrary အပိုင္းမွာ ပါမွာပါ။
Objects - data ေကာ code ေကာ ႏွစ္ခု လံုးပါဝင္ပါတယ္။
Other Data Types
NULL - ဘာမွ မရွိတဲ့ value။ No value ေပါ႔။
resource - PHP မွာ သီးသန္႔အသံုးျပဳတာ။ external resources ေတြကို ညႊန္ျပေပးတယ္။
Converting Between Data Types
float နဲ့တြက္ျပီး int ျပန္ထုတ္ခ်င္တဲ့အခါမွာ
$x =10.88;
echo (int) $x; //outputs 10
Variable
Variable ဆိုတာ temporary storage containers ေတြပါ။ Variable name ေတြကို a-z,A-Z စျပီးေပးလို႔ရျပီး ေနာက္ပိုင္းမွာ number ေတြ လိုက္လို႔ရတယ္။ underscore( _ ) လည္းလိုက္လို႔ရတယ္။ number ေတြနဲ့စျပီးေတာ့ ေပးလို႔မရပါ။ special character ေတြေပးလို႔မရပါ။ _ နဲ့စျပီးေပးလို႔မရဘူး။
$name="valid"; //Valid Name
$_name="invalid"; //Invalid Name
$1name="invalid"; //Invalid Name,start with a number
Variable Variables
$name='foo';
$$name='bar';
$echo $foo;
//Display 'bar'
$$ သံုးလိုက္တဲ့အတြက္ $name ရဲ့ foo က variable ျဖစ္သြားတယ္။
$name='123'; // 123 is your variable name, this would normally be invalid.
$$name='456'; // Assign, you assign a value
echo ${'123'};
//Finally, using curly braces you can output 456
variable ကလည္း function ျဖစ္ႏိုင္တယ္။
function myFunc()
{
echo "myFunc";
}
$f='myFunc';
$f(); //wil call myFunc();
Determining If a Variable Exists
Variable ရွိမရွိ စစ္မယ္ဆိုရင္ isset ဆိုတာနဲ့ စစ္လို႔ရတယ္။ boolean return ျပန္တယ္။ ရွိရင္1 လို႔ ျပန္တယ္။
echo isset($x);





ေနာက္ထပ္ထပ္ျပီးေတာ ့ PHPပါတ္သတ္တာေလးေတြထပ္ေရးေပးေစခ်င္ပါေသးတယ္
http://edu.mysteryzillion.org/php-basic
ေနာက္ထက္ဆက္ျပီးေတာ ့ PHP နဲ ့ပါတ္သတ္ျပီးအေျခခံက်တာာေလးကိုေရးေပးေစခ်င္ပါတယ္
ဥပမာ PHP နဲ ့ mysql ကိုဘယ္လိုခ်ိတ္ဆက္ရမလဲ
PHP ကိုေတာ ့နည္းနည္းသိျပီး mysql ကိုတခါမွမသံုးဖူးလို ့ပါေရးေပးေစခ်င္ပါတယ္
http://www.w3schools.com/PHP/php_mysql_intro.asp