Hey guys, Sorry if my title is not so clear,but here's what I'm trying to do: I have car model table and I'm creating html drop down from names. Problem though is that some models are repeating because of different generations and I can't keep these in different tables because of database structure. So I'm getting results like: 1. Integra 2. CL 3. CL 4. MDX 5. NSX This is not good for my dropdown I need something like: 1. Integra (1) 2. CL (2) 3. MDX (1) 4. NSX (1) Could somebody help me out in this. I know I did it once sometime ago, but don't have access to code and I guess am too old to remember
and..... http://php.net/manual/en/function.array-unique.php Use them two functions on your mysql $row (which is an array)...then use a loop to display them as your second example.
Simply group the naming field in your SQL query and get the count of that value and you can show it in brackets. post your sql if you want i can do it for you.