PHP use mainly echo , print and prinf to output data to browser.
eg:
echo "Hello World ";
echo "Hello"," World";
print "Hello World";
print ("Hello World");
printf ("Hello Word");
Lets see these functions prototype
int print(argument)
void echo (string argument1 [, .... string argumentN])
boolean printf(string format [, mixed args])
now whats difference between echo and print
echo is faster because it doesn't return any value while print return '1' if data is printed successfully
and also we cannot join strings using "," when using print
printf is for blending static and dynamic information like in C Language
eg:
printf("My Age is %d",22);
PHP echo vs print vs printf
