Hallo, ich habe ein Problem mit der formatiereung eines Datums, leider helfen mir die zahlreichen posts auch nicht weiter.
Folgendes Problem ich vereinige zwei Tabellen und gebe dies als array aus, nun ist logischer weise dass Datum nicht dd.mm.yyyy sondern yyyy.mm.dd ,wie kann ich dies um formatieren wenn ich die Daten als array ausgebe?
Hat jemand ne Idee?
Pat
Folgendes Problem ich vereinige zwei Tabellen und gebe dies als array aus, nun ist logischer weise dass Datum nicht dd.mm.yyyy sondern yyyy.mm.dd ,wie kann ich dies um formatieren wenn ich die Daten als array ausgebe?
Hat jemand ne Idee?
PHP:
$result = mysql_query("SELECT start_date, start_time, race_name, race_link,
race_location, country_url , country_flag FROM race, race_country WHERE
race.country_id=race_country.country_id ORDER BY start_date asc LIMIT
$start,$limit");
if ($result)
{
while ($row = mysql_fetch_array($result))
{
$start_date= date("d. m. y");
print"<tr><td>\n";
print=$row["start_date"]
print $row["start_time"];
print"</td><td>\n";
print "<a href='\n";
print $row["race_link"];
print "'>\n";
print $row["race_name"];
print"</a></td><td>\n";
print $row["race_location"];
print"</td><td>\n";
print "<a href='\n";
print $row["country_url"];
print "'target='_blank'>\n";
print "<img src='/cal/images/\n";
print $row["country_flag"];
print "'>\n";
print"</a>\n";
print"</td><td>\n";
print"</td>\n";
print "</tr>
"; } mysql_free_result($result); }
else { echo mysql_error (); }