Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6692879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:55:06+00:00 2026-05-26T05:55:06+00:00

Im trying to validate my output data from a php site that Im calling

  • 0

Im trying to validate my output data from a php site that Im calling with

<?php include_once('nav.inc.php');
?>

The thing is when Im using this code

<ul>
<li><a href="gb.php">GÄSTBOK</a></li>
<li><a href="index.php">OM MIG</a></li>
<li><a href="portfolio.php">PORTFOLIO</a></li>
<li><a href="cv.php">CURRICULUM VITAE</a></li>
</ul>

I wont get any errors, But when Im trying with the other code I get alot of errors. Is there any way to write the code so It validates ?

This is the code thas bugging me

<?php 
$index = 'menu';
$gb = 'menu';
$portfolio = 'menu';
$cv = 'menu';
$menuLinkid=basename($_SERVER['PHP_SELF'],'.php');
if($menuLinkid=='index'){
$index = 'myButtons';
}else if($menuLinkid=='gb'){
        $gb ='myButtons';
}else if($menuLinkid=='portfolio'){
        $portfolio ='myButtons';
}else if($menuLinkid=='cv'){
$cv ='myButtons';
}
?>

<div id="fronticon">
<a href="contact.php"><img src="images/em.png" alt="Email" title="Email"/>
</a> 
</div>

<ul>
<li><a class="<?php echo $index; ?> "href="index.php">OM MIG</a></li>
<li><a class="<?php echo $gb; ?> "href="gb.php">GÄSTBOK</a></li>
<li><a class="<?php echo $portfolio;?> " href="portfolio.php">PORTFOLIO</a></li>
<li><a class="<?php echo $cv; ?> "href="cv.php">CURRICULUM VITAE</a></li>
</ul>

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:55:07+00:00Added an answer on May 26, 2026 at 5:55 am

    You need spaces between the ?> ” and the href. You can’t have them next to each other with no space.

    Should be:

    <li><a class="<?php echo $index; ?> " href="index.php">OM MIG</a></li>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When Im trying to validate my PHP output data my echo string puts a
I’m trying to validate input by using egrep and regex.Here is the line from
I am trying to parse the json output from http://www.nyc.gov/portal/apps/311_contentapi/services/all.json And my php json_decode
When trying to validate my site, I get the following error: Line 188, column
I'm trying to validate that a submitted URL doesn't already exist in the database.
I was trying to validate an XML signature. The validation according to this tutorial
I am trying to validate via RegEx as follows... If Regex.IsMatch(Output, \b & Serial)
I'm very new in regular expression and I'm trying to validate date using following
im trying to validate a string of text that must be in the following
This is using jQuery 1.6.1 and Validate 1.8.1. I have been banging my head

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.