我正在寻找一个程序在我公司的内部网上运行,以帮助整理项目.GitHub它是不可能的,因为我不会为私人回购付钱,但我喜欢GitHub的样子.
GITLAB也很好,我会选择它,除了我的服务器运行PHP而不是Ruby.有解决方案吗?
可能重复:
在PHP中对关联数组进行排序
我有一个看起来像这样的Jsion数组:
{
devices: [
{
name: " Server 00 ",
ip: " 172.20.10.10 ",
status: 0
},
{
name: " Server 10 ",
ip: " 172.20.10.12 ",
status: 0
},
{
name: " Server 01 ",
ip: " 172.20.10.13 ",
status: 1
},
{
name: " Server 11 ",
ip: " 172.20.10.15 ",
status: 0
}
]
}
Run Code Online (Sandbox Code Playgroud)
我正在使用PHP将其转换为html表,但我希望它们按字母顺序排列.这是我的PHP代码:
private static function toHtml($output, $rmkeyworkxen = false) {
$return = '';
$devices = json_decode($output, true)['devices'];
foreach($devices as $device) { …Run Code Online (Sandbox Code Playgroud)