This would be better if you use a hash instead of named arrays. $link['title'], $link['href'], etc. That way the code is much more readable.