Reply to lost with arrays

Your name:

Reply:


Posted by windandwaves on 10/08/25 11:38

Hi Folk

I have the following array:
$m = array();
$m[0] = array("lodgings", "rooms");
$m[1] = array("location", "there and away");
$m[2] = array("functions", "events and groups");
$m[3] = array("activities", "things to do", "exclusive activities");
$m[4] = array("enquiries", "tariffs");
$m[5] = array("download", "media info");

If I have a string from the array, for example, download, and I want to find
out what number it occures in (i.e. 0 - 5, for download the answer being 5)
then how do I find out? I looked at the array functions, but I am not sure
what to use (arrays are new to me).

Also, I saw this function (which may actually help), what is the & doing on
the first line?

function array_set_current(&$array, $key){
reset($array);
while(current($array)){
if(key($array) == $key){
break;
}
next($array);
}
}

TIA

Nicolaas

[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

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