[SPAM] - [Mediawiki-l] A PHP question for a newbie - Email found in subject

Piyush Varma pvarma at inventures.com
Wed Dec 28 19:22:16 UTC 2005


Hi,

I found the meaning of foreach ($this->data['nav_urls'] as $key => $item). Does it iterate the data array? Where is this data array defined in clean.php or MediaWiki code please?

Thank you,
 
Piyush


-----Original Message-----
From: mediawiki-l-bounces at Wikimedia.org
[mailto:mediawiki-l-bounces at Wikimedia.org]On Behalf Of Piyush Varma
Sent: Wednesday, December 28, 2005 10:29 AM
To: mediawiki-l at Wikimedia.org
Subject: [SPAM] - [Mediawiki-l] A PHP question for a newbie - Email
found in subject


Hi,
 
I need interpretation the following lines of code:
 
foreach ($this->data['nav_urls'] as $key => $item) {
  $href = htmlspecialchars($item['href']);
  $text = strtolower(htmlspecialchars(
   $this->translator->translate($key)));
  if ($key == "upload" && $isEnglish)
   $text = "upload files";
  $link = "<a href='$href'>$text</a>";
  if ($key == "help")
   $helpLink = $link;
  if ($key == "recentchanges")
   $recentLink = $link;
  if ($key == "upload")
   $uploadLink = $link;
  if ($key == "specialpages")
   $specialLink = $link;
  if ($key == "recentchangeslinked")
   $relatedLink = $link;
 }
 
Especially, what do I understand by "$this->data['nav_urls'] as $key => $item" line of code?
 
Thank you,
 
Piyush
 
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l



More information about the MediaWiki-l mailing list