Posts: 115
Location: Kathmandu,Nepal
|
Thanks leavethisplace.
I am really struggling with php. This is the first time I have used it in any website.
You solution worked. But a litle problem has arisen once again. All these link in the navbar had their own link titles. These are defined in the second array $titles. I tried to use for and foreach to iterate thrugh the array to add the link titles to these links. But it kept on giving unexpected results. When using nested foreach loops, for 4 links and 4 titles, it showed 16 links.
Again, when you are viewing a page that's in the navbar, its link will be automatically cut off and it will appear simply as text. So the link titles will be misplaced.[i am getting confused myself explaining this.]
Like in the array $navigation, the first link is Home. In the array $title, the first title is 'Welcome to our restaurant.' Now when you are viewing the home page, the first key in the $title array will go the second link. i.e because the first will not contain a link at all the link meat will have title 'Welcome to our restaurant'.
Everyone, please help me out of this.
Hope my problem is understood although I couldn't explain it that clearly.
|