Reply to Re: Can I make an array of tuples? Is there a better way?

Your name:

Reply:


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
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация