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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:17:07+00:00 2026-06-11T13:17:07+00:00

I have a situation where a client needs interlinking sets that are displayed on

  • 0

I have a situation where a client needs interlinking sets that are displayed on his footer, but every page it needs a completely different interlinking set. So we decided we would just throw all of our interlink sets in arrays and call them out in a quick PHP snippet. SUCCESS! It works, but now we have an even bigger issue. With the site racking up well over 500 pages, the manual labor needed to input each interlinking set is going to consume to much time. So my goal is to develop a PHP script that will take an interlinking set (see below) and place into an array (see below) and all we then need to do is go through each page and look to see if it has an interlinking set at the footer if it doesn’t we will write a quick snippet which will take far less time then programming all of the interlinking sets.


Here is what the interlinking set looks like (from our source code)

<!-- begin_block_7-->
<h2>Cost Reduction Resources</h2>
<a href="http://www.sourceconsulting.com/">shipping charges</a>  ||    
<a href="http://www.sourceconsulting.com/shipping-costs-calculators/fedex-ups-rates-calculator">ups shipping</a>  ||    
<a href="http://www.sourceconsulting.com/carrier-contract-negotiation">freight delivery</a>  ||   
<a href="http://www.sourceconsulting.com/parcel-freight-bill-audit">freight payment companies</a>  ||    
<a href="http://www.sourceconsulting.com/shipping-costs-calculators">compare shipping costs</a>  
<!-- end_block_7 -->

We need to take that interlinking set and place it into an array like this

$interlinking_set_1 = array ( "<a href='http://www.sourceconsulting.com'>cost freight shipping</a><br/>", 
    "<a href='http://www.sourceconsulting.com/carrier-contract-negotiation'>trucking freight rates</a><br/>", 
    "<a href='http://www.sourceconsulting.com/shipping-costs-calculators/fedex-ups-rates-calculator'>ups shipping calculator</a><br/>", 
    "<a href='http://www.sourceconsulting.com/parcel-freight-bill-audit'>air freight carrier</a><br/>",
    "<a href='http://www.sourceconsulting.com/reduce-shipping-costs'>shipping costs</a><br/>",
    "<a href='http://www.sourceconsulting.com/shipping-costs-calculators'>freight rate calculator</a><br/>"
    );

I know that this will definitely use regex which is why I included it as a tag. I’m at a complete lose as to how to do this. We have well over 500 interlinking sets that need to be inputted into an array. We have already spent over 10 man hours doing this and there must be a simpler solution. I’m not asking for someone to write the script for me just give me a “comprehensible” idea that can be put into effect with out tons of hours.

Thanks
Dyllen

  • 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-11T13:17:08+00:00Added an answer on June 11, 2026 at 1:17 pm
    <?php
        $html = @file_get_contents($YOUR_URL);
    
        if(preg_match('/\<\!\-\- begin\_block\_7\-\-\>[\s\S]*\<\!\-\- end\_block\_7 \-\-\>/iU', $html, $linkBlock)){
            preg_match_all('/\<a.*\>.*\<\/a\>/iU', $linkBlock[0], $links);
            var_dump($links);
        }
    ?>
    

    That’ll get you your links and output them

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

Sidebar

Related Questions

Situation I have a client library that uses the Windows Azure AppFabric Service Bus
I have a server\client application which needs to request two different remote proxies via
Here is my situation, I have an ESRI Map Silverlight application that needs to
I have a situation where the client has his git repository setup as a
Situation: you have a web page with a form that has a first name
I have a situation where I want a Java client to have a two-way
I have a situation where I have to write a client in Java against
I have a client server situation, where the client sends the data (a movie
Common situation: I have a client on my server who may update some of
I have a weird situation. A client of mine has a website having this

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.