The PHP function echo is a way for outputting text to the web browser.
The echo function will be used more than any other functions.
The use of echo function to output to a web browser is shown below:
The text outputed is sent to the browser as a web page
In the second echo statement echo was used to write a valid Header 5 HTML statement
To do this simply put the <H5> at the beginning of the string and closed it with </H5> the end.
You must be careful when using HTML code or any other string that includes quotes!
See the example below for the correct usage of echo function:
The example shown below how variables are 'echo' out to the browser:
Variables and text strings can be joined together with a period( . ). The example below shows how to do it.
This method of joining two or more strings together is called concatenation
NoteFor more detail please see Php Manual at http://www.php.net
echo လို႔ ေခၚတဲ့ PHP function သည္ web browser တြင္ စာမ်ား၊ အရုပ္မ်ား ျဖစ္ေပၚ ေစရန္ ေဆာင္ရြက္ ေပးေသာ function တခု ျဖစ္ပါသည္။
echo function သည္ အျခားေသာ function မ်ားထက္ အသံုးမ်ား ေသာ function တခုျဖစ္ ပါသည္။
echo function ကိုသံုး၍ web browser တြင္ျမင္ရ ေစရန္ ေအာက္ပါ အတိုင္း ေဆာင္ရြက္ ပါသည္။
အထက္ပါ ဥပမာ တြင္ text မ်ားကို browser သို႔ web page အျဖစ္ ေပးပို႔ ေၾကာင္း ေတြ႔ရ ပါမည္။
ဒုတိယ echo စာေၾကာင္းတြင္ echo ကိုအသံုး ျပဳ၍ Html <H5></H5> ကို output လုပ္ထား ပံုကို ေလ့လာပါ။
ထိုသို႔ ျပဳလုပ္ ရန္အတြက္ string ၏ ထိပ္တြင္ <H5> ကို ေရးၿပီး string ၏ အဆံုး၌ </H5> ကိုပိတ္၍ ေရးသား ျခင္းျဖင့္ လြယ္ကူစြာ ေဆာင္ရြက္ ႏိုင္ ပါသည္။
Quote မ်ားကို HTML code မ်ားႏွင့္ ေသာ္၎ အျခားေသာ string ႏွင့္တြဲ ၍ ေသာ္၎ သံုးလ်င္ အထူး သတိထား ရန္လို အပ္ ပါသည္။
Quote မ်ား အသံုးျပဳပံုကို ေအာက္ေဖၚျပပါ ဥပမာ တြင္ ေဖၚျပထား ပါသည္။
ေအာက္ေဖၚျပပါ ဥပမာ တြင္ variable မ်ားကို browser သို႔ echo လုပ္ပံု ကိုေဖၚျပ ထား ပါသည္။
Variables မ်ားကို text strings မ်ားႏွင့္ period( . ) ကိုအသံုးျပဳ ၿပီး ပ႒မ join လုပ္ၿပီး မွ echo လုပ္ႏိုင္ ပါသည္။ ေအာက္ေဖၚျပပါ ဥပမာ ကို ေလ့လာပါ။
Strings မ်ားကို join လုပ္သည့္ နည္းလမ္းကို concatenation ဟု ေခၚ ပါသည္။