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

  • SEARCH
  • Home
  • 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 8172783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:53:39+00:00 2026-06-06T21:53:39+00:00

I am dynamically adding a hash to a url – taking that strpos and

  • 0

I am dynamically adding a hash to a url – taking that strpos and trying to display a certain footer based on that variable, I know I could just translate the whole page but I need to do this for a client, why isn’t it working I suppose is the question?

The url looks like http://www.example.com/#/sp/

Here is my header:

<?php 
    $page = $_SERVER['REQUEST_URI'];
    $isSpanish = strpos($page, '/sp/'); 
    $isSpanishDynamic = strpos('#/sp/', $page);

Here is my footer:

   <?php if($isSpanishDynamic !== FALSE || $isSpanish !== FALSE) { ?>
                    <li><a href="/">PÁGINA DE INICIO</a></li>
                    <li><a href="/sp/our-story">HISTORIA</a></li>
                    <li><a href="/sp/menu">MENÚ</a></li>
                    <li><a href="/sp/contact">CONTACTO US</a></li>
                    <li><a href="/sp/order-online">ORDENE POR INTERNET</a></li>
    <?php } else { ?>
                    <li><a href="/">Home</a></li>
                    <li><a href="/en/our-story">Our Story</a></li>
                    <li><a href="/en/our-menu">Our Menu</a></li>
                    <li><a href="/en/contact">Contact Us</a></li>
                    <li><a href="/en/order">Order Online</a></li>
    <?php } ?>  
  • 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-06-06T21:53:41+00:00Added an answer on June 6, 2026 at 9:53 pm

    In a url like http://example.com/#/sp/, the hash #/sp/ will never be sent to the server, so you cannot do anything with in PHP unless you interact with the server somehow.

    See Wikipedia:

    The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server. When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment. Instead, the agent waits for the server to send the resource, and then the agent processes the resource according to the fragment value. In the most common case, the agent scrolls a Web page down to the anchor element which has an attribute string equal to the fragment value. Other client behaviors are possible

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

Sidebar

Related Questions

Possible Duplicate: Dynamically adding collapsible elements I would like to know how I could
In my application I'm dynamically adding new TdxBarSubItems based off of a SQL query.
I'm dynamically adding ssi includes based on variables and I would like to be
I am dynamically adding tooltips to elements depending on certain circumstances, but I dont
I have a flowpanel that I'm dynamically adding usercontrols to. I want it to
I have an array of numbers and dynamically adding new numbers to that array
I have written a piece of code in C#. That is, dynamically adding TextBox
I am dynamically adding columns to a table by using document.createElement(th) var newTH =
I am dynamically adding a layout according to a particular array size which varies
I am dynamically adding an image to a canvas object which was working for

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.