Hi Guys, I have a database and my date in my sql is stored as YYYY/MM/DD
when i fetch the results of the database i want the date to be shown as DD/MM/YY
here is my code …
$sql = "SELECT date, venue, price FROM gigs ORDER BY date ASC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "Date:" .$row ["date"]. "<br>";
echo "Venue:" .$row ["venue"]. "<br>";
echo "Price:  " .$row ["price"]. "<br>";
echo "<BR>";
}
}
else {
echo "No Messages";
}
$conn->close();
?>
thanks guys