PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

What is the difference between print and echo?


You are unlikely to ever want to know this, however the difference is that print will return a value to let you know if the statement worked or not, whereas trying the same thing with echo will result in error:

<?php
echo "Please don't make me say it... \n";
$you = print "Hello World!\n";
echo 
"Returning $you"//Returning 1, assuming the print worked
?>

Comments on this Question/Answer

How can i highlight the existence of particular word from a given string.eg. string is........"this is my first program, that is going to be excute". Now problem is to highlight the existence of "is" in to whole string.
By: Rimple, 05 Dec 2008 02:53:40



Reply to comments / post your own comment >>>

ASK A QUESTION

More strings PHP Questions

How do I make the first letter of a string uppercase?

How do I extract the values of variables from a string?

How do I convert characters to HTML entities using PHP?

How do I convert relevant characters in a string to HTML entities?

How do I make the contents of a string lower case?



Custom Search