User Tools

Site Tools


ower_own_php_wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ower_own_php_wiki [2007/09/14 01:44] – created roumaniower_own_php_wiki [2007/10/03 05:06] (current) cs241101
Line 1: Line 1:
 ====== Our Own PHP Wiki ====== ====== Our Own PHP Wiki ======
 +echo processes statements within single quotes and double quotes differently:
 +
 +<code php>
 +$name=Robot;
 +echo 'Hello, $name'; 
 +echo "Hello, $name";
 +</code>
 +
 +The output will look like:
 +<code HTML>
 +Hello, $name
 +Hello, Robot
 +</code>
 +
 +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 **[[http://ca3.php.net/manual/en/function.echo.php|echo]]**
 +
 +
  
ower_own_php_wiki.1189734299.txt.gz · Last modified: 2007/09/14 01:44 by roumani

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki