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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:40:26+00:00 2026-05-16T02:40:26+00:00

$link = http://site.com/view/page.php?id=50&reviews=show How can we add &extra=video after id=50 ? id is always

  • 0
$link = http://site.com/view/page.php?id=50&reviews=show

How can we add &extra=video after id=50?

  • id is always numeric.
  • url can have many other variables after ?id=50
  • &extra=video should be added before the first & and after the 50 (value of id)

It will be used this way:

echo '<a href="' . $link . '">Get video</a>';

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-16T02:40:27+00:00Added an answer on May 16, 2026 at 2:40 am

    Is ID always the first post parameter? If so, then you could jsut do some sort of string manipulation. Use strpos($link, "&") to find out the position where you want to insert. Then do a few substr() based on that position and then append them all together. Its kind of hacky I know, but it will definitely work.

    $pos = strpos($link, "&");
    $first  = substr($link, 0, $pos);
    $last = substr($link, $pos);
    $extra = "&extra=video";
    $newLink = $first . $extra . $last;
    

    See this link for some of the string manipulation functions that I mentioned above: https://www.php.net/strings

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

Sidebar

Related Questions

The page in question is at the following address: http://richiesportfolio.com/temp-site-tester/index.html As you can see
Here is the link for the site: http://amfotography.com/newsite/clients.html I am only using this folder
This link http://ajaxcontroltoolkit.codeplex.com/releases/view/11121#DownloadId=28808 shows a popup on which one has to agree before being
I have found this link: http://www.jfree.org/forum/viewtopic.php?f=3&t=6314 Its back in 2007 where they agree that
Link to site in question: http://www.christopherwarrington.com/testing_ground I have a start screen that is set
alt text http://sites.google.com/site/yanchengcheok/Home/help-remove-dot-line.png?attredirects=0 Whenever a click event happen on a hyper-link, I will use
Link: http://www.fraynepainting.com/services The problem is that div#dditem_2 (the div with the Take a look...
In this link: http://css-tricks.com/snippets/jquery/jquery-plugin-template/ it has a line of code that says // Add
So what I would like to do is scrape this site: http://boxerbiography.blogspot.com/ and create
I have an attribute to add a page to my site's navigation (its a

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.