Posted by Jerry Stuckle on 08/15/07 01:25
ben@spam.com wrote:
> Pretty new to php so sorry if this is an obvious question.
>
> I want to create an array that contains a tuple, i.e. a pair of
> values.
>
> e.g. myarray[$key] = ($firstname,$lastname)
>
> I would then need a function that returns only the first or second
> member of the tuple.
>
> The tuple could also be a list, provided there's a function for only
> returning the value at a particular index value of the list.
>
> I am sure there is an obvious way to accomplish the same thing in php
> (without using a multi-dimensional array) but it is escaping me at the
> moment.
>
> Ben
>
Two choices:
1. Multidimensional array
2. An array of objects
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|