Return to Eli-PHP Tutorials
PHP Programming Part 4: Variables in Print in PHP Programming
1. What are the three types of PHP variables that Eli discusses?
The three types of PHP variables Eli discusses are strings, numbers, and arrays.
2. What naming rules apply to PHP variables?
PHP variables must start with a dollar sign, “$”, followed by either a letter or an underscore. In addition, PHP variables are case sensitive, so $VARIABLE and $variable are different variables.
3. Compare and contrast the html < br > tag in HTML and the \n in PHP.
When using the “< br >” tag, the web browser will see and create the line break because it reads HTML. The ‘\n’ tag in PHP however will not be read on the web browser since it is not an HTML tag, and will only be seen in the text source code.