Set and outPut simple variables Dreamweaver and PHP


show more Setting and outputting simple variables provides you with in-depth training on Business. Taught by David Gassner as part of the Dreamweaver with PHP and MySQL show less
please wait ...

Setting and outputting simple variables

While most of this video series deals with PHP code that's generated by Dreamweaver, it's useful to know a little bit about hand-coding PHP. So I'm going to show you how to set a simple variable, and then how to output the value of that variable in a web page. I'll be working with files in the folder 02_gettingstarted > 05_variables, and I'll open the file in that folder, variables.php. Let's take a look at the existing code. In this file, there is just simple use of the echo command that's outputting the literal string Hello World from PHP.

I'm going to show you how to set a simple variable that contains that same value. A variable is like a little bucket of information. All programming languages support them, but the way you declare and set the value of a variable in each programming language differs. You can set a variable anywhere in a PHP page, but wherever you set it, the variable will only be available from that point downward. So I'm going to p...

Setting and outputting simple variables
Video duration: 3m 56s 4h 55m Intermediate Updated Jun 12, 2012

Viewers:

Setting and outputting simple variables provides you with in-depth training on Business. Taught by David Gassner as part of the Dreamweaver with PHP and MySQL

Subjects:
Business Developer Web
Software:
Dreamweaver
Author:
please wait ...