Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Disambiguation - PHP List

PHP Lists, or PHPList?

1. Lists in PHP

A PHP "array" - as they're know - is really a linked list in computer science terms [plus an ordered map - another story!]

Let me explain - a linked list is a series of values, one after another held in a single collection, and referenced by a position number in that collection. And the data at each position can be handled / processed in a loop.

  <?php
  $team = array("rOwEnA","colin","reBECCA","Graham","lISa");
  foreach ($team as $friend) {
    $onmy = ucwords(strtolower($friend));
    print ("I am writing to $onmy\n");
    }
  ?>


produces:

  I am writing to Rowena
  I am writing to Colin
  I am writing to Rebecca
  I am writing to Graham
  I am writing to Lisa


The list function lets you name each element of an array a a separate variable, so I could write:

  <?php
  $team = array("rOwEnA","colin","reBECCA","Graham","lISa");
  list ($party,$paid,$starguest,$drinks,$food) = $team;
  print ("The organiser is $party and the catering is by $food\n");
  ?>


produces:

  The organiser is rOwEnA and the catering is by lISa

Such lists are particularly useful where you have read a line of data from a file of database, and each element of a line / record relates to a different attribute / propoerty - lots of parties perhaps in our example!

Happy to tell you a lot more about lists on our PHP Courses.

2. PHPlist software

phplist is a piece of open source campaign managing software - see [here]. Whilst I need to manage my mailing lists better, I'm afraid I know little about it. Ah - if only I had the time to learn to be more efficient, I would then have the time ...
(written 2014-03-07)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
H106 - PHP - Arrays
  [409] Functions and commands with dangerous names - (2005-08-11)
  [603] PHP - setting sort order with an associative array - (2006-02-13)
  [773] Breaking bread - (2006-06-22)
  [832] Displaying data at 5 items per line on a web page - (2006-08-14)
  [1116] PHP adding arrays / summing arrays - (2007-03-23)
  [1199] Testing for one of a list of values. - (2007-05-22)
  [1451] More PHP sample and demonstration programs - (2007-12-01)
  [1614] When an array is not an array - (2008-04-17)
  [2215] If nothing, make it nothing. - (2009-06-02)
  [2274] PHP preg functions - examples and comparision - (2009-07-08)
  [2915] Looking up a value by key - associative arrays / Hashes / Dictionaries - (2010-08-11)
  [2920] Sorting - naturally, or into a different order - (2010-08-14)
  [3004] Increment operators for counting - Perl, PHP, C and others - (2010-10-18)
  [3379] Sorting data the way YOU want it sorted - (2011-08-05)
  [3534] Learning to program in PHP - Regular Expression and Associative Array examples - (2011-12-01)
  [4068] Arrays in PHP - contain different and even mixed data types - (2013-04-24)
  [4072] Splitting the difference with PHP - (2013-04-27)


Back to
Taking Greyhounds and Lurchers to London for the day
Previous and next
or
Horse's mouth home
Forward to
It always happens to me when I'm in Borehamwood!
Some other Articles
Metatables, Metamethods, classes and objects in Lua
You wait a long time - then buses come in threes. It's timetabled that way!
Python, PHP, Ruby, C, Lua, etc ... course prices held for the rest of 2014
Disambiguation - PHP List
It always happens to me when I'm in Borehamwood!
Taking Greyhounds and Lurchers to London for the day
A busy January
Four in a Bed - the story continues
Melksham Rail Link
Facebook marketing - early experiences
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/mouth/4244_Dis ... -List.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb