[Mediawiki-l] A PHP question for a newbie
Piyush Varma
pvarma at inventures.com
Wed Dec 28 18:28:51 UTC 2005
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
More information about the MediaWiki-l
mailing list