[Year 12 SofDev] Records in PHP

Guy Flaherty G.Flaherty at xavier.vic.edu.au
Wed Jul 14 09:09:10 EST 2010


Laurie,

Looking at the figure, and especially the paragraph underneath that explains how the data held in the record will be accessed, I would imagine that a simple associative array is all that is meant by this. Judging by the examples in the PHP online documentation here:   http://php.net/manual/en/language.types.array.php this should be all you need to do in order to represent the record. Then you would need to create a structure to hold your 'records' I suppose, such as another array ;)

I am sure you could do the same thing with a class, but this would seem a bit heavy to me. Especially if your 'records' come from things like csv data.

Guy Flaherty
Xavier College
 
>>> "Laurie Savage" <sav at pvgc.vic.edu.au> 14/07/10 08:40 AM >>> 


This is my first time teaching SD. We're using PHP and the Fitzpatrick/Keane
text. PHP doesn't have a specific type called a "record" and a single vector
array doesn't seem to match the concept as illustrated (fig 6.5, page 162).
Looking at the example in the text I'm wondering if I could describe it as
an instance of a class?

 

Laurie Savage

Pascoe Vale Girls College 

 



Scanned by Sonar. 
Date: 2010-07-14 08:47:02.672
From: sofdev-bounces at edulists.com.au
To: g.flaherty at xavier.vic.edu.au
Profile: Default_In
Mail id: challenge-9061221990h9s-0




"This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the Network Manager at Xavier College. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Xavier College. Whilst every attempt has been made to ensure material in this email message is free from computer viruses or other defects, the attached files are provided, and may only be used, on the basis that the user assumes all responsibility for the use of the material transmitted."



More information about the sofdev mailing list