Here is code code Im Working With:
<?php
function get_gold_time_noformat()
{
$goldquery = mysql_query("SELECT * FROM (
SELECT
@row := @row +1 AS rownum, time,metal
FROM (
SELECT @row :=0) r, metal_price
WHERE metal = 'GOLD' ORDER BY `metal_price`.`time` DESC
) ranked
WHERE rownum % 16 = 1
LIMIT 6
");
while($result = mysql_fetch_array( $goldquery ))
{
echo "<div id=\"dates\">" . date('g a', strToTime($result['time'] . ' - 7 hours')) . "</div>";
}
}
?>
I am simply trying to reverse the array, I tried using array_reverse but couldn’t get it to work.
Array reverse will work if you use it on an array.
Although I suggest seeing if you can reverse it in the SQL.