I am pulling in movie data from an external API to create a database similar to IMDb for my final year university project, and the release date information is formatted as YYYY-MM-DD (i.e 16 December 2012 is displayed as 2012-12-16, rather than 16-12-2012). Is there any way to reorder the segments of the array to reshuffle them for a British English audience?
The raw result of the release date is as follows, gleaned from the getMovieReleases function in the TMDb API (N.B. to save on post size, I've only copied in the first 10 results from the getMovieReleases function):
[id] => 17578
[countries] => Array
(
[0] => Array
(
[iso_3166_1] => US
[certification] => PG
[release_date] => 2011-12-21
)
[1] => Array
(
[iso_3166_1] => DE
[certification] => 6
[release_date] => 2011-10-27
)
[2] => Array
(
[iso_3166_1] => FR
[certification] =>
[release_date] => 2011-10-26
)
[3] => Array
(
[iso_3166_1] => TR
[certification] =>
[release_date] => 2011-11-04
)
[4] => Array
(
[iso_3166_1] => DK
[certification] => 7
[release_date] => 2011-10-27
)
[5] => Array
(
[iso_3166_1] => GB
[certification] => PG
[release_date] => 2011-10-26
)
[6] => Array
(
[iso_3166_1] => FI
[certification] => 12
[release_date] => 2011-11-04
)
[7] => Array
(
[iso_3166_1] => IT
[certification] => T
[release_date] => 2011-10-28
)
[8] => Array
(
[iso_3166_1] => SE
[certification] =>
[release_date] => 2011-10-28
)
[9] => Array
(
[iso_3166_1] => NL
[certification] => 6
[release_date] => 2011-10-26
)
[10] => Array
(
[iso_3166_1] => BE
[certification] =>
[release_date] => 2011-10-26
)
)
)
I am calling the data in my PHP & HTML as follows, only picking out the US and UK release dates:
$releases = $tmdb->getMovieReleases($tmdb_id);
$uk = $releases['countries']['14']['release_date'];
$us = $releases['countries']['0']['release_date'];
<section>
<p class="title">RELEASE DATE</p>
<p class="section_body">
<?php echo $uk; ?> (UK)<br>
<?php echo $us; ?> (US)
</p>
</section>