I'm trying to add a column to csv which is exported using a php file.
Down the bottom in post_date
is the part where I need to know the correct string to get when the submission/ wordpress post was made. I've currently got a default date request in there but that's just the current time and not the post time. How can you actually get the date the post was made? I would really appreciate the help!
$surveyArray = array(
'id' => $survey_id,
'title' => $survey_title,
'airline' => $airlineName,
'meal' => $mealName,
'test_great' => $get_test_great[0],
'fair_price' => $get_fair_price[0],
'friendly_host' => $get_friendly_host[0],
'right_temp' => $get_right_temp[0],
'looked_good' => $get_looked_good[0],
'would_reorder' => $get_would_reorder[0],
'comment' => $get_comment[0],
'airlane_race_number' => $get_airlane_race_number[0],
'post_date' => $postdate = date ("Y-m-d H:i:s"),
);
$allAirlinesAndAnswersInArray[] = $surveyArray;
}