Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems

Phone System reconfiguration 11.1.2018 and 12.1.2018 - we are on email but incoming phone not available all the time

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
PHP module H103
Variables, Operators and Expressions
Exercises, examples and other material relating to training module H103. This topic is presented on public courses Learning to program in PHP, PHP Programming, Beginning PHP - weekend course / hobby / club / leisure users, PHP Programming, Learning to program in PHP

Writing a straightforward but meaningful executable web page in PHP. You'll learn how to read data from the user via a form, how to perform calculations using operators, and store the results in computer memory using variables. You'll also learn how to include those results in your response page.

Articles and tips on this subjectupdated
4642A small teaching program - demonstration of principles only
Putting a program on a public facing web server is like putting a car on the driveway outside your home, then going away on holiday. You had better make sure the car is locked, and that if it's an open-decked truck there's nothing left on the deck. Or you had better make sure that the driveway is secured. ...
4324Learning to program - variables and constants
Further material from our "learning to program in ...." courses ... an introduction to variables and constants variable basics Information - data - needs to be stored in a program between statements. Or rather it needs to be stored in the computer's memory. At the lowest of levels, that's a binary ...
3917BODMAS - the order a computer evaluates arithmetic expressions
What order does a computer program use to evaluate expressions? If I write   2 + 3 * 4 + 5 does it start off, left to right ...   2 + 3 is 5   5 * 4 is 20   20 + 5 is 25 No! it does not, even though the newcomer might think that was the most natural way for ...
3916PHP variables - dynamically typed. What does that mean?
When we're programming, we store data in our computer memory in one step of our process, then read it back for further reference or processing in a later step. In the very early days, this was planned out using the numeric location in the computer memory, but very rapidly programming languages ...
3278Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java.
Starting with a clean slate. Are variables initisialised, and if so, how? Even with this fundamental question, languages vary considerably. C and C++ From my (e)mailbag ... """In a piece of code we’ve written we declare an array, but we do not fill the elements with values, we assume (dangerous ...
2215If nothing, make it nothing.
Here's a peculiar PHP statement I wrote this morning:   if ($aindex[$chk] == "") $aindex[$chk] = ""; What was I doing? I am actually checking to see whether there's anything in an array element and if there isn't (which could be because it's empty or because it doesn't yet exist), then it ...
748Getting rid of variables after you have finished with them
If you've finished with a variable in your program, you can usually just leave it "in situe" and it will be destroyed and the memory it occupied will be released when you exit from your program. In many languages, variables within named blocks of code have an even shorter "shelf life" - by default, a ...
483Double Dollars in PHP
What does this print? <?php $first = "fur"; $last = "feather"; $$first = "yum yum "; ${"$first$last"} = "yikes"; print "$fur $furfeather"; ?> It prints "yum yum yikes". In PHP, you can write a variable name within a variable name, and that's what I've done in this example. The variable called ...
Examples from our training material
header.txt   File to be included in master example ?>
k1.php   A calculation in PHP
k2.php   A calculation with variables
k3.php   Getting a variable from a form - OLD style
k3a.php   Getting a form variable - new and somewhat more secure style
k4.php   Example of comment types
master.php   PHP page that calls in an include file ?>
result   Master and Header code merged
simsan.php   Simple sanitisation and sticky field example
We ran a PHP course for Pepperdine University
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Expressions and operators.
Getting a value from a form.
Alternative ways of getting values from a form.
Comments in PHP.
Including a file.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/H103.html • PAGE BUILT: Mon Feb 8 18:55:24 2016 • BUILD SYSTEM: WomanWithCat