You are here: Can I make an array of tuples? Is there a better way? « PHP Programming Language « IT news, forums, messages
Can I make an array of tuples? Is there a better way?

Posted by ben@spam.com on 08/15/07 01:16

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

 

Navigation:

[Reply to this 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

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