21,886
社区成员
发帖
与我相关
我的任务
分享
arr=('title'=>'士大夫sss,'title'=>'中文中文中文','title'=>'中文中文,'title'=>'中文,'title'=>'abc,'title'=>'ccc,'title'=>'sdf)
<?php
$arr = [
['title' => 'dsads谢谢ds', 'title' => 'et4wtsfs', 'title' => '=>中文中文', 'title' => '中文了'],
['date' => 'dsads', 'date' => 'et4wtfs', 'date' => '中文中文', 'date' => '中文了'],
];
var_dump($arr);
二维数组
<?php
$arr = [
['title'=>'dsads谢谢ds','date'=>'dsads'],
['title'=>'et4wtsfs','date'=>'et4wtfs'],
['title'=>'中文中文','date'=>'中文中文'],
['title'=>'中文了','date'=>'中文了']
];
var_dump($arr);
排序,只能大致做到中文开头进行排序
<?php
$arr = [
['title'=>'dsads谢谢ds','date'=>'dsads'],
['title'=>'et4wtsfs','date'=>'et4wtfs'],
['title'=>'中文中文','date'=>'中文中文'],
['title'=>'中文了','date'=>'中文了']
];
$title = array_column($arr,'title');
arsort($title);
var_dump($title);
<?php
$arr = ['dsads','et4wtfs','中文中文','中文了'];
arsort($arr);
var_dump($arr);
为啥不能用,可以用啊