A "parliamentary" train service is one that's run on a railway to meet minimum legal requirements.
The term originates from a requirement on all companies to provide at least one train a day at rate of an old penny a mile calling at all stations, so that rail transport would be available to all. S ....
A bright spring morning!
Any regular readers may have notices that the addition of comment and text to this blog has been patchy during April; failure at Easter to rebuild the server based on Centos rather than Fedora, and to build fresh releases of Apache httpd, PHP, MySQL and the other tools that ....
Some more examples from another recent PHP course (PHP has been "flavour of the month" although I'm moving on to a fair chunk of Python training over the next few weeks as well!
PHP basics:
Conditionals and loops - [here]
Regular and associative arrays - [here]
Application of PHP to web forms:
Fir ....
It's vital when you write a program that you comment it well. That's so that your colleagues will understand later on what you have done (and why you have done it), and so that YOU can remember too. And it's because commenting is vital that every course we teach, from the very first program after "H ....
I've written a new series of examples to teach Object Oriented Programming in PHP ... taking tables in a restaurant as my example, as we all have to eat. Calculating things like the number of people who can sit at a table (that's not as straightforward as you think) and hiding that calculation in ....
There are lots of ways of splitting a string into pieces - you can do it character by characters, at a specific character, and word by word. PHP provides functions for splitting strings in these ways - and more - into arrays of shorter strings.
To split a string into a list of single character str ....
Inside, the web is all about passing around and manipulating strings of text - so the programming langauges of the web such as PHP have to be really strong in their string handling facilities. I give you two new examples from last week's course ... easy lessons that form the bedrock on which the po ....
Variables within a program are lost when the program exits ... unless the program takes some sort of action to save them. And if it does, you've then got to have another program pick them up to use them somehow.
Web applications in PHP are a series of short-running programs. A program is run each ....
Even in the simplest of PHP applications, it's worthwhile to separate the validation of the incoming data from the calculations, and both of those elements from the HTML of the page itself. That means that you can use the calculation stuff - the "business logic" in other applications that use the sa ....
PHP's arrays can be keyed by both value and by string... and on this week's PHP course we've covered both. An indexed array (not really an array - rather akin to a list in Perl or Python) starts at index element number 0 and works up from there. Each array member may contain a different type of data ....