What is the difference between print and echo?
<?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
print(1 . " + " . 2 . " = " . 1+2 . "n"); gives answer 3 why?Hello, Is it possible to specify a character-encoding in the filter_var function. Thank you for your reply, Jan
How do I make the first letter of each word upper case?
How do I remove trailing whitespace from a string?
How do I find the last occurrence of a character in a string?
