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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:43:37+00:00 2026-05-13T07:43:37+00:00

Hi good people once again While busy traversing, iterating and manipulating my arrays from

  • 0

Hi good people once again

While busy traversing, iterating and manipulating my arrays from a mysql database i have stumbled on a problem, which i know you will be able to help me with – fellow geeks.

I have a COLUMN the contains city names and some cities appear several times on the COLUMN.

I’m using the following query to retrieve that data:

  $query = "SELECT cities from info_table WHERE store='kfc' ";

    $result = mysql_query($query);

while($city = mysql_fetch_array($result){
$total_cities_array[]=$city[0];
}

the problem is that in $total_cities_array some cities are a entered several when i ony need a single storage for every city.
is there some php or mysql that i can use to fix this.
Thank you.

  • 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-13T07:43:37+00:00Added an answer on May 13, 2026 at 7:43 am
    $query = "SELECT cities from info_table WHERE store='kfc' GROUP BY cities";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings good people - I need some help. I have until now buildt web-pages
Are there any good applications that people use with the MongoDB database to make
In a php/mysql application where people can registre, is it a good idea to
Good morning, I have mysql queries where I would like to calculate percentage of
It seems like many people have some issues once they start adding video into
once in a while you have to draw a picture of your (planned) IT
Hopefully the good people at Stackoverflow can help me today - I basically drank
Is there any website where people share and discuss good examples of object-oriented design?
Like many people here, I started my programming experience with the good ol' green
I have found a few good replies to similar content so far, but never

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.