1.What are the difference between echo , print , print_r ?
else this 3 can we show output to a client in some other
way?

Answer Posted / ramesh

echo is not a function only it is display String Or integer Values

echo $record;
Array



print is a function it display the string and integer values it not applicable for loops and arrays

print($record);

Array

print_r is a return function it used for Strings and integers and as well as array of values and return object values

do u want effective retriview data from arrays use below statement

print_r($record);

Array ( [id] => 0 [date_details] => [password] => dasf [email] => sdfhhh )

echo "<pre>"; print_r($record);echo "</pre>";

Array
(
[id] => 0
[date_details] =>
[password] => dasf
[email] => sdfhhh
)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Mcrypt used for?

592


How many columns can be added in a table in mysql?

506


Describe session in php.

541


What is the difference between php and cakephp?

527


Why is php so popular?

525






How does the identity operator ===compare two values in PHP?

655


How does php work?

548


How to remove the new line character from the end of a text line?

521


What is php trait?

530


Is php fully object oriented?

497


What is an example of a variable?

557


What is the difference between a session and cookies?

499


What is difference between variable declaration and variable definition?

511


How to get complete current page url in php?

567


What is chrome logger?

565