User Tools

Site Tools


ower_own_php_wiki

Our Own PHP Wiki

echo processes statements within single quotes and double quotes differently:

$name=Robot;
echo 'Hello, $name'; 
echo "Hello, $name";

The output will look like:

Hello, $name
Hello, Robot

So when you have a string in single quotes, it prints everything as it is (“literally”). When you put it in double quotes, it'll expand it, process it and then print it. Single quotes is faster; double quotes has far more uses.

View more details on echo

ower_own_php_wiki.txt · Last modified: 2007/10/03 05:06 by cs241101

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki