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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:23:31+00:00 2026-05-19T22:23:31+00:00

HI all Can someone please please help me been trying to suss this for

  • 0

HI all

Can someone please please help me been trying to suss this for a while now scratching my head.

I am adding links to a SESSION array here is my code.

    session_start();
$test = $_GET;
$_SESSION['value'][]=$test;
echo "<pre>";
//print_r($_SESSION);
echo "</pre>";


$turn = $_SESSION['value'];

foreach (array_reverse($turn) as $value) { 

$furl = "http://example.s3.amazonaws.com/".urlencode($value['tune_name']);

echo $furl;

}

here is the result off my print_r($_SESSION);

Array
(
    [attach] => Array
        (
        )

    [backups-2] => true
    [dnb] => true
    [house] => true
    [tech-house] => true
    [uk-garage] => true
    [uk-grime] => true
    [uk-hip-hop] => true
    [uncategorized] => true
    [warehouse] => true
    [active] => 
    [value] => Array
        (
            [0] => Array
                (
                    [tune_name] => Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [submit] => Listen
                )

            [1] => Array
                (
                )

            [2] => Array
                (
                    [tune_name] => Music/dnb/Abort_Delta Heavy_192.mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                    [submit] => Listen
                )

            [3] => Array
                (
                    [tune_name] => Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [submit] => Listen
                )

            [4] => Array
                (
                    [tune_name] => Music/dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/21st Century (Feat. Cabbie)_Tantrum Desire_192.mp3
                    [submit] => Listen
                )

            [5] => Array
                (
                    [tune_name] => Music/dnb/Abort_Delta Heavy_192.mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                    [submit] => Listen
                )

            [6] => Array
                (
                )

            [7] => Array
                (
                    [tune_name] => Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/03 Twerk feat. Yo Majesty (Sub Focus Remix).mp3
                    [submit] => Listen
                )

            [8] => Array
                (
                    [tune_name] => Music/dnb/Abort_Delta Heavy_192.mp3
                    [tune] => http://example.s3.amazonaws.com/Music/dnb/Abort_Delta Heavy_192.mp3
                    [submit] => Listen
                )

        )

)

so what i am trying to do is loop through that array and show the link but i dont what any duplicate values.

$turn = $_SESSION['value'];

foreach (array_reverse($turn) as $value) { 

$furl = "http://example.s3.amazonaws.com/".urlencode($value['tune_name']);

echo $furl;

}

and this is the result i get from the foreach.

http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
http://example.s3.amazonaws.com/
http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2F21st+Century+%28Feat.+Cabbie%29_Tantrum+Desire_192.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
http://example.s3.amazonaws.com/

So annoying i only want it to show.

 http://example.s3.amazonaws.com/Music%2Fdnb%2FAbort_Delta+Heavy_192.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2F03+Twerk+feat.+Yo+Majesty+%28Sub+Focus+Remix%29.mp3
http://example.s3.amazonaws.com/Music%2Fdnb%2F21st+Century+%28Feat.+Cabbie%29_Tantrum+Desire_192.mp3

Because above doesnt have any duplicate values i have tried so much array_unique hasnt worked for me can someone please help?

  • 1 1 Answer
  • 1 View
  • 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-19T22:23:32+00:00Added an answer on May 19, 2026 at 10:23 pm

    You can use an associative array to check if it’s already outputted.

    $outputted = array();
    

    Use $furl as a key.

    foreach (array_reverse($turn) as $value) { 
    
        $furl = "http://example.s3.amazonaws.com/".urlencode($value['tune_name']);
    
        if (isset($outputted[$furl])) {
            continue;
        }
    
        echo $furl;
    
        $outputted[$furl] = true;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone help me with this: This is a program to find all the
hopefully someone can help me here. been up all night browsing and nothing I
Please can someone help me. Basically I am using vb.net. All I am doing
Can someone please tell me how to show all privileges/rules from a specific user
Can someone tell me why this processes all the files and then does it
Can someone help me get started with a button timeout feature. All I want
I am trying to get all the prime(row) numbered records from my table.Can someone
I have been trying to get this to work for 12 hrs now and
Can someone please help me out? My code for splitting the strings is working
Can someone please help me to find out why I can't update Eclipse so

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.