I am somewhat new to php and as such, thought i would start off small. i have an array that holds links which i am using to build a menu of a sorts but everytime i try to create the menu, only the first and last elements in the array function properly. anything in between has a newline character inserted between the closing '"' of my href tag and the '>'. I have tried several remedies and yet I am still without a cure. here is the code that I am using below.
foreach ($AboutLinks as $link) {
if(file_exists($link)){
$fh = fopen($link, "r");
$linkText = addslashes(htmlspecialchars(fread($fh, filesize($link))));
$linkKey = key($AboutLinks);
echo "\n<a href=\"#\" onclick=\"display.writeIt('$linkText'); return false\">$linkKey</a>";
if($i++!=$NoElem) echo " | ";
next($AboutLinks);
fclose($fh);
}
}
any help you can give me with this matter would be greatly appreaciated.