mysql - PHP Array with DateTime Echo -
i have mysql column datetime
type containing 2017-09-10 05:27:48 value. echoing want echo (a) 12-hour format , (b) without seconds. (c) add hours time here php codes.
`$output = array('data' => array()); $sql = "select * violators"; $query = $connect->query($sql); $x = 1; while ($row = $query->fetch_assoc()) { $output['data'][] = array( $x, $row['name'], $row['lname'], $row['lnumber'], $row['violation'], $row['aplace'], $row['address'], $row['pnumber'], $row['datetime'], $row['oname'], $paid, $actionbutton ); $x++; } echo json_encode($output);
Comments
Post a Comment