PHP Dei,
[php]<?php
$pagenames = Array(“datruth.php”, “members.php”, “military.php”, “government.php”, “diane.php”, “contact.php”, “drugs.php”, “employment.php”);
foreach( $pagenames as $value )
{
echo ‘<a href="’.$value.’".>
’;
}
?>[/php]
It is simple, but I cannot figure it out… Please help!!! Thanx ahead…
Maybe something like this?
[php]<?php
$pagenames = Array(“datruth.php”, “members.php”, “military.php”, “government.php”, “diane.php”, “contact.php”, “drugs.php”, “employment.php”);
?>
<!doctype html>
nav ul li a:hover {
background-color: magenta;
}
-
<?php
foreach( $pagenames as $value )
{
$linkName = str_ireplace('.php', '', $value);
echo '
- ' . $linkName . ' '; } ?>
L O L Or, just take out the extra PERIOD after the quote!
echo ‘<a href="’.$value.’".>
’;
Should be:
echo ‘
’;
No such thing as a period in this HTML format: <a href="…".> Should be
Hope that helps!
So there’s an extra period in the tag and I missed it, big deal. Still doesn’t help the OP for he still should close the anchor tag and learn HTML/CSS styling. for putting
at then end of an anchor tag is poor HTML.
While the code wouldn’t validate, it does work and to fix it just
[php]echo ‘
Now wasn’t that easy. :-\
Yes, we are both correct. My mind stopped at the extra period… Sorry for that…