Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用mysqli_fetch_数组对数据值进行排序?_Php_Sql_Sqlite - Fatal编程技术网

Php 如何使用mysqli_fetch_数组对数据值进行排序?

Php 如何使用mysqli_fetch_数组对数据值进行排序?,php,sql,sqlite,Php,Sql,Sqlite,我想知道如何使用mysqli_fetch_数组对数据值进行排序 <?php $query_noticias="SELECT post.* FROM post WHERE state ='1' ORDER BY id DESC LIMIT 2"; $resultadonoticias=mysqli_query($link, $query_noticias); while($array=mysqli_fetch_array($resultad

我想知道如何使用mysqli_fetch_数组对数据值进行排序

<?php

        $query_noticias="SELECT post.* FROM post WHERE state ='1' ORDER BY id DESC LIMIT 2";
        $resultadonoticias=mysqli_query($link, $query_noticias);

        while($array=mysqli_fetch_array($resultadonoticias)){

            echo $array['title'];

        echo "<p>".$array['title']."</p>";
        }
?>

echo "Tello j� rescindiu e vai para a Fiorentina
Tello j� rescindiu e vai para a Fiorentina"

echo“Tello j� 撤销佛罗伦萨的合同
泰洛j� 撤销佛罗伦萨的合同”
你能帮我吗


我想可以是
array['title']['$x']
但不知道。

订单数据值是什么意思?它们是从您的查询中排序的,
orderbyid DESC
。或者您是在谈论回音中的问号?
$query\u noticias=“选择post.*从post WHERE state='1'ORDER BY rand()LIMIT 0,6”goodbye@idalinarodrigues您已在查询中按
id
排序。你到底想点什么?