I need to keep one row value from table in bottom position in an array using PHP and MySQL. Here is my table:
db_designation:
id name
1 aaa
2 bbbb
3 Other
4 tttt
My query is below:
$sqldeg=mysqli_query($connect,"select * from db_designation order by id desc");
while ($row=mysqli_fetch_array($sqldeg)) {
$desdata[]=array("did"=>$row['id'],"dname"=>$row['name']);
}
Here I need this id->3 name->Other
row from table value always come in last in the array i.e-$desdata
.