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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:48:01+00:00 2026-06-14T02:48:01+00:00

I currently have an array that looks like the one below but I only

  • 0

I currently have an array that looks like the one below but I only want to display show results in the array from which are unique (description), I presume with array_unique? but I keep getting the same results?

Here is my array:

$taglist = array(5) { 
[0]=> array(5) { 
    ["id"]=> string(2) "27" 
    ["page_id"]=> string(2) "18" 
    ["description"]=> string(10) "Web Design" 
    ["slug"]=> string(10) "web-design" 
    ["visibility"]=> string(7) "visible"
} 
[1]=> array(5) { 
    ["id"]=> string(2) "29" 
    ["page_id"]=> string(2) "18" 
    ["description"]=> string(3) "Tutorials" 
    ["slug"]=> string(3) "tutorials" 
    ["visibility"]=> string(7) "visible"
}
[2]=> array(5) {
    ["id"]=> string(2) "31"
    ["page_id"]=> string(2) "21"
    ["description"]=> string(3) "tag" 
    ["slug"]=> string(3) "tag"
    ["visibility"]=> string(7) "visible"
}
[3]=> array(5) { 
    ["id"]=> string(2) "32" 
    ["page_id"]=> string(2) "21" 
    ["description"]=> string(10) "Web Design" 
    ["slug"]=> string(10) "web-design" 
    ["visibility"]=> string(7) "visible"
}
}

Here is my while:

$items      = array();
$results    = $taglist;

foreach ($results as $result)
{
$items[]= $result['description'];
$items  = array_unique($items);
}

echo '<ul>';
while ($tag_item = current($items))
{
echo '<li><a href="/'.$page['slug'].'/tag/'.$tag_item['slug'].'/">'.$tag_item['description'].'</a></li>';
    next($items);
}
echo '</ul>';
  • 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-14T02:48:03+00:00Added an answer on June 14, 2026 at 2:48 am
    $taglist = array(
    0 => array('description'=>'one'),
    1 => array('description'=>'two'),
    2 => array('description'=>'one'),
    3 => array('description'=>'three'),
    4 => array('description'=>'one'),
    );
    
    // echo var_export($taglist, 1);  // uncomment to see the diff vs var_dump()
    
    foreach($taglist as $tag){
    $new[] = $tag['description'];
    
    }
    
    var_dump(array_unique($new));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a problem. I have a code that looks like the one
Currently have a drop down menu that is activated on a hover (from display:none
I have a text file that currently looks like this: <joke>What do you call
I have an array that looks like: array( [0] => 1 [1] => 2
Currently I have a code that looks like: for ($i=0; $i<=($num_newlines - 1); $i++)
I am currently trying to pass an array that I have created in Javascript
Currently, I have an array of Strings, each with random characters in it that
I have an API call that returns a byte array. I currently stream the
I currently have a statement which reads if(Arrays.asList(results).contains(Word)); and I want to add at
So I have a CSV file that looks like this: 12345, Here is some

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.