For printing out strings, there are echo, print and printf.
Explain the differences.

Answer Posted / hardik

echo is a language construct(You can see we don't use
paranthesis for echo).echo does not return any value. print
is also a language construct but it returns an integer
value. printf is a function..... echo is considered fast
than print and printf

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to connect to mysql from a php script?

554


What are the 3 scope levels available in php and how would you define them?

501


What is the use of addslashes in php?

522


How do you use an array in excel?

523


Tell me what types of loops exist in php?

565






Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?

517


How to delete an element from an array?

552


What library is used for pdf in php?

516


What is the difference between the include() and require() functions?

871


What is http get and post?

524


When are you supposed to use endif to end the conditional statement?

529


What is difference between print and echo in php?

469


Explain type casting and type juggling.

547


What is the difference between single-quoted and double-quoted strings in php?

530


How can we check the value of a given variable is alphanumeric?

535