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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:02:18+00:00 2026-06-12T22:02:18+00:00

Here is my sample array Array ( [0] => Array ( [size] => 7.5

  • 0

Here is my sample array

    Array
(
    [0] => Array
        (
            [size] => 7.5 D(M) US
            [price] => $49.99
            [color] => Black Grey
        )

    [1] => Array
        (
            [size] => 8 D(M) US
            [price] => $46.90
            [color] => Black
        )

    [2] => Array
        (
            [size] => 8 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [3] => Array
        (
            [size] => 8.5 D(M) US
            [price] => $46.90
            [color] => Black Grey
        )

    [4] => Array
        (
            [size] => 8.5 4E US
            [price] => $49.99
            [color] => BLACK/MTLC DARK GREY/BLACK
        )

    [5] => Array
        (
            [size] => 9 D(M) US
            [price] => $49.99
            [color] => Black
        )

    [6] => Array
        (
            [size] => 9 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [7] => Array
        (
            [size] => 9.5 D(M) US
            [price] => $49.99
            [color] => Black Grey
        )

    [8] => Array
        (
            [size] => 9.5 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [9] => Array
        (
            [size] => 10 D(M) US
            [price] => $49.99
            [color] => Black
        )

    [10] => Array
        (
            [size] => 10 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [11] => Array
        (
            [size] => 10.5 D(M) US
            [price] => $49.99
            [color] => Black Grey
        )

    [12] => Array
        (
            [size] => 10.5 4E US
            [price] => $49.99
            [color] => BLACK/MTLC DARK GREY/BLACK
        )

    [13] => Array
        (
            [size] => 11 D(M) US
            [price] => $54.90
            [color] => Black
        )

    [14] => Array
        (
            [size] => 11 D(M) US
            [price] => $57.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [15] => Array
        (
            [size] => 11 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [16] => Array
        (
            [size] => 11.5 D(M) US
            [price] => $47.84
            [color] => Black Grey
        )

    [17] => Array
        (
            [size] => 12 D(M) US
            [price] => $50.90
            [color] => Black
        )

    [18] => Array
        (
            [size] => 12 4E US
            [price] => $75.00
            [color] => Black/Metallic Dark Grey/Black
        )

    [19] => Array
        (
            [size] => 13 D(M) US
            [price] => $58.59
            [color] => Black
        )

    [20] => Array
        (
            [size] => 13 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [21] => Array
        (
            [size] => 14 D(M) US
            [price] => $54.99
            [color] => Black
        )

    [22] => Array
        (
            [size] => 14 4E US
            [price] => $49.99
            [color] => Black/Metallic Dark Grey/Black
        )

    [23] => Array
        (
            [size] => 15 D(M) US
            [price] => $54.99
            [color] => Black
        )

)

And I want to happen is that to get only the unique value of "color"

echo '<select>';
    foreach($store as $item){
        echo '<option>'.$item['color'].'</option>';
    }
    echo '</select>';

And here’s I want to display it..

  • 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-12T22:02:19+00:00Added an answer on June 12, 2026 at 10:02 pm
    <?php
    $items = Array
    (
        Array
        (
            'size' => '7.5 D(M) US',
            'price' => '$49.99',
            'color' => 'Black Grey',
        ),
        Array
        (
            'size' => '8 D(M) US',
            'price' => '$46.90',
            'color' => 'Black'
        )
    );
    
    
    $colors = array();
    foreach ($items as $item) {
        $colors[] = $item['color'];
    }
    $colors = array_unique($colors);
    var_dump($colors);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here the sample case.. i want to display banner randomly by percentage based on
Here is the sample code that I ran on Visual Studio 2010: #include <iostream>
Here is a sample array of all external JS files from paypal.com: Array (
I coded a simple form to calculate a price by size, shape, color and
I have an array that is of size 4,9,16 or 25 (according to the
So i have a class name repository which is just a simple array.Here is
Simple question here: is there any way to convert from a jagged array to
Here's sample model classes, which being use with Entity Framework Code First: public class
Here is sample data <table class=sparql border=1> <tr> <th>abstract</th></tr> <tr> <td> Cologne is Germany&#39;s
Data: Here is sample table(TableA) data ID StartTime EndTime 1 2012-03-22 06:00:00.000 2012-03-22 06:30:00.000

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.