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 514047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:29:03+00:00 2026-05-13T07:29:03+00:00

Basicly I have a bunch of links on a page and I will use

  • 0

Basicly I have a bunch of links on a page and I will use something like this

<?PHP echo $SITE_PATH ?>

Many many times on the same page but it will show a Notice in PHP for doing so.

I know you are supposed to use things like isset() but would I really need to use it every time I call?

<?PHP echo $SITE_PATH ?>

— EDIT :
If I switch to using a defined variable, then the notices seem to go away

  • 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-13T07:29:03+00:00Added an answer on May 13, 2026 at 7:29 am

    Two solutions, here :

    • only use variables that exist — which is what you should probably do.
    • or test if they exist (with isset) before trying to use them.

    There is no magic ^^

    If your application is using many not-set variables, you probably have some problem in your design.

    In a case such as the one you presented, for a variable that’s used lots of times, I would make sure it exists, and, if not, set it to ”, for instance, at the beginning of my script.

    That’s not really looking great, but it’ll work — and, this way, you won’t have to go through your whole application, patching everything.

    (Or I might also disable the E_NOTICE error_reporting level — I don’t like that idea, but, sometimes, it’s really the only way to deal with some code base)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page with basicly the following URL structure: www.example.com/main.php?userId=mattias.wolff www.example.com/definitions.php?userId=mattias.wolff www.example.com/tasks.php?userId=mattias.wolff
I have a few links, which should toggle their corresponding div like this... $('#link
I have an odd problem. Basicly my page works fine however after a small
So i have click function and i'm calling this function couple times on same
I have searched hi and low for a solution for this, basicly I would
I'm having problem with my array basicly this is what i have: $test =
Okay, so basicly I have this website that auto refreshes every couple of seconds,
I have this static function which basicly makes a connection to a webpage, send
Ok, so I basicly have this list. What I'm trying to do is just
Basicly a socket connection will be initiated if I have a server socket application...

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.