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);
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2011
(212)
-
▼
March
(15)
- PHP Sessions
- Como saber que navegador usa un visitante con PHP
- Comonent/com_content/view/category/tmpl/default
- testing01
- Backup Recovery / Export to CSV
- HTML - IMG ALT Attribute with Mozilla
- WideImage - PHP library for image manipulation
- Usage
- Tools to make your website work better
- PHP echo vs print vs printf
- Protect table and field names with backticks - Sol...
- Getting Screen resolution using JavaScripts & PHP
- Php Web Development India Articles on Articlesbase...
- Php Web Designers Developers Programmers Articles ...
- How PHP Works ??
-
▼
March
(15)