Hi all, I'm new here. I've learned C, C++, and am just starting to learn PHP, but this really has be stumped.
Error Message:
Parse error: syntax error, unexpected T_STRING, expecting '(' in G:\Server\www\medicine4tibet\links.config.php on line 2
Code:
[pre]
<h4 class="hidden">Site Navigation</h4>
<ul>
<?php
require('../links.config.php');
foreach( $links as $filename => $nicename ) {
//spit out a bunch of formatted links as: <li><a href="?item=filename.php" class="toplink">Nicename</a></li>
echo "<li><a href='?item=$filename.php'>$nicename</a></li>\n";
}
?>
</ul>
[/pre]
Contents of ../links.config.php:
[pre]<?php
/*
This array holds the key to the website.
All the pages have their Filename and their "Nice Name"
$links[filename] = "Nice Name"; */
$links[index] = "Home";
?>[/pre]
It seems like the require function is throwing the error, but include does the same thing.
My server is using php5, apache2.
Any Ideas? I'm sure this one is simple, but it really has me stumped..
Thanks...