By default phpGrid pulls out the data field name defined in database as the header for each column. You can simply change the title using method set_col_title().
1 2 3 4 5 6 7 8 9 10 11 12 13 | // Always include namespace and conf.php on TOP of the script. use phpCtrl\C_DataGrid; require_once("/file/path/to/conf.php"); $dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders"); // change column titles $dg -> set_col_title("orderNumber", "Order No."); $dg -> set_col_title("orderDate", "Order Date"); $dg -> set_col_title("shippedDate", "Shipped Date"); $dg -> set_col_title("customerNumber", "Customer No."); $dg -> display(); |