我有以下的表,我正確地得到了所有信息,但在「日期」出現在一個塊格式:PHP日期和時間格式
<?php
// search for desired team
$searchQuery = $api->searchTeam(urlencode("Real Madrid"));
// var_dump searchQuery and inspect for results
$response = $api->getTeamById($searchQuery->teams[0]->id);
$fixtures = $response->getFixtures('home')->fixtures;
?>
<tr>
<td><?php echo $fixture->homeTeamName; ?></td>
<td>-</td>
<td><?php echo $fixture->awayTeamName; ?></td>
<td><?php echo $fixture->result->goalsHomeTeam; ?></td>
<td>:</td>
<td><?php echo $fixture->result->goalsAwayTeam; ?></td>
<td><?php echo $fixture->date; ?></td>
</tr>
結果:
Home Team Away Team Result Date/Time
Real Madrid CF - RC Celta de Vigo 2 : 1 2016-08-27T18:15:00Z
如何添加空間在日期和時間之間刪除T和Z字符,而我沒有訪問php.ini文件?
請參閱['str_replace'](http ://php.net/manual/en/function.str-replace.php)和相關的[String Functions](http://php.net/manual/en/ref.strings .php) –