hello I want to remove this T00:00:00 from the Date. Start Date: 2022-03-25T00:00:00
foreach ($data as $key => $value) {
$startDate= $value['startDate']
echo "<li><h5>Start Date: $startDate</h5></li>";
CodePudding user response:
You can split by character 'T' and take the first part of it.
foreach ($data as $key => $value) {
$startDate = explode("T", $value['startDate'])[0];