# Parse Error?

**URL:** <https://forum.kirupa.com/t/parse-error/26947>\
**Category:** programming\
**Created:** [July 28, 2003, 4:41pm UTC](https://forum.kirupa.com/t/parse-error/26947 "2003-07-28T16:41:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [July 28, 2003, 4:41pm UTC](https://forum.kirupa.com/t/parse-error/26947/1 "2003-07-28T16:41:20Z")

</div>

I’m trying to include a file “menu.inc” into my page, and when I go to the test page I set up it returns:  
“Parse error: parse error in /home/xxviiine/public\_html/menu.inc on line 3”

This is what is in the .inc file

```php
<?php
$menuArray[0] = '<font size="2"><b><a href="http://www.xxviii.net/main.php">Main</a></b></font>'
$menuArray[1] = '<font size="2"><b><a href="http://www.xxviii.net/photoshop/index.php">Photoshop</a></b></font>'
$menuArray[2] = '<font size="2"><b><a href="http://www.xxviii.net/disclaimer.php">Disclaimer</a></b></font>'
$menuArray[3] = '<font size="2"><b><a href="http://www.xxviii.net/contact.php">Contact</a></b></font>'
$menuArray[4] = '<font size="2"><b><a href="http://www.xxviii.net/vb">Forums</a></b></font>'
$num = sizeof($menuArray);
for($i=0; $i<$num; $i++) echo "$menuArray[$i] ";
?>

```

absolutely no clue why I’m getting an error… any help would be awesome

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:31pm UTC](https://forum.kirupa.com/t/parse-error/26947/2 "2003-07-28T17:31:48Z")

</div>

I know nothing about php but would the space in "$menuArray[$i] " make a difference? Also, why are you doing your navigation like that? Is there any particular reason?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:40pm UTC](https://forum.kirupa.com/t/parse-error/26947/3 "2003-07-28T17:40:00Z")

</div>

The space isn’t the problem. The problem should be somewhere on line 3… but I just can’t seem to place it.

I’m doing the menu like this becaues it is for a tutorial site and there will potentially be hundreds of pages so If I need to make even a minor adjustment to the menu I only have to edit one page as apposed to like 100.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:42pm UTC](https://forum.kirupa.com/t/parse-error/26947/4 "2003-07-28T17:42:14Z")

</div>

Well if PHP debugging is anything like ASP debugging, even though it says that it is on line 3 doesn’t necessarilly mean that. I wish I could be of more help but I have no freaking clue about PHP.

I understand the include part but why are you putting the menu links into an array?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:44pm UTC](https://forum.kirupa.com/t/parse-error/26947/5 "2003-07-28T17:44:53Z")

</div>

They’re in an array so I can easily add items and it will still put them into the menu with the for loop.  
Thanks for helpin out so far… at least now I know it could be on a different line.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:46pm UTC](https://forum.kirupa.com/t/parse-error/26947/6 "2003-07-28T17:46:39Z")

</div>

Shouldn’t there be a semi-colon after you close the string?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:48pm UTC](https://forum.kirupa.com/t/parse-error/26947/7 "2003-07-28T17:48:46Z")

</div>

HAHA!  
I think that’s it…  
oh man

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:49pm UTC](https://forum.kirupa.com/t/parse-error/26947/8 "2003-07-28T17:49:42Z")

</div>

YES!  
That was it!!!  
Wow… I hate that… I always do something really stupid like that  
thanks so much man

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 5:50pm UTC](https://forum.kirupa.com/t/parse-error/26947/9 "2003-07-28T17:50:26Z")

</div>

haha your welcome. That’s funny, I’ve never like looked @ php before in my life. Crap like that makes me a happy person.
