<p>PHP's standard <code>sort</code> ought to do the trick. It probably uses the unicode order (<a href="https://en.wikipedia.org/wiki/Chinese_character_orders#Computer_sorting" rel="nofollow noreferrer">Read more</a>).</p>

CC BY-SA 4.0
2023-09-10T04:11:43.867Z
That's not going to work.
fat penguin
CC BY-SA 4.0
2023-08-08T15:05:11.550Z
2023-08-08T15:05:11.550Z
jrpear
<p>I have to sort a country list (written in PHP programming language as an associative array in the order <code>'xy' =&gt; 'name of country',</code>) in simplified Chinese language to make sense for Chinese people.</p>
<p>So, what for the English language is alphabetic order, is for Chinese the Radical-Stroke Order. So far so good...</p>
<p>Is there a tool to sort them in the correct sense for Chinese people?</p>

CC BY-SA 4.0
2023-08-08T14:14:31.203Z
Lets call the array id key and the array content value. Do you want to sort by key or by value?
Pedroski
CC BY-SA 4.0
2023-08-08T20:22:31.423Z
Do you have an ordered list of the Radical-Stroke Order? I think you would need a system similar to ASCII code. You can use "XINHUA ZIDIAN".
PdotWang
CC BY-SA 4.0
2023-09-10T04:12:48.797Z
If you want an "ordered list," that's usually done stictly by number of strokes.
fat penguin
CC BY-SA 4.0
2023-09-24T07:49:06.480Z
I've asked a friend from China. He sorted it for a coffee ^^
Manny
<word-order><stroke-order>
How to sort list (PHP-Array) of countries in Chinese simplified language ('alphabetically')-> in Radical-Stroke Order?
# How to sort list (PHP-Array) of countries in Chinese simplified language ('alphabetically')-> in Radical-Stroke Order?

(Asked by: username_0 on 2023-08-08)

I have to sort a country list (written in PHP programming language as an associative array in the order `'xy' => 'name of country',`) in simplified Chinese language to make sense for Chinese people.

So, what for the English language is alphabetic order, is for Chinese the Radical-Stroke Order. So far so good...

Is there a tool to sort them in the correct sense for Chinese people?

**Tags:** word-order, stroke-order

> **Comments:**
> **username_1**: Lets call the array id key and the array content value. Do you want to sort by key or by value?  
> **username_2**: Do you have an ordered list of the Radical-Stroke Order? I think you would need a system similar to ASCII code. You can use "XINHUA ZIDIAN".  
> **username_3**: If you want an "ordered list," that's usually done stictly by number of strokes.  
> **username_0**: I've asked a friend from China. He sorted it for a coffee ^^  

---

## 1 answers

### Answer by username_4 on 2023-08-08. Score: 0

PHP's standard `sort` ought to do the trick. It probably uses the unicode order ([Read more](https://en.wikipedia.org/wiki/Chinese_character_orders#Computer_sorting)).

> **Comments:**
> **username_3**: That's not going to work.  

---

