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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -