adspace


What is the Diff. Between echo() and Print() in PHP?

Answer Posted / satyajit das

1> print()is am method which returns boolean parameter(s)
either 1 or 0. Where echo() is an object rather statement
which does not have any return parameter in spite of has
its functionality.

2> According to print is structured and faster in sence it
does not return any complex parameter but if the complex
parameter is concerned echo becomes slow. complex parameter
indicates any complex value like 1.3e^2.

3> print supports multiple arguements w.r.t. '.' like echo
e.g.

<?php

$p = "MY ISAM";

$j = 1;

print($p."&nbsp;".$j);

echo("<br>".$p.$j);

?>

Is This Answer Correct ?    20 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between htmlentities() and htmlspecialchars()?

1094


What does $_files means?

1166


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2179


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1080


sort term descripttion form, report and uery

2254


Explain me is it possible to destroy a cookie?

1032


What is the current stable version of php? What advance thing in php7?

1095


how to detect a mobile device using php

1174


What is the current stable version of php?

1126


if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer

1994


What is trait in php?

1068


List some features of php that are deprecated in php7?

1024


Write a program using while loop?

1122


Which variable declarations within a class is invalid in php?

1050


What is difference between static and final in php?

1109