String Formatting of CRUD table column Format crud table column using string function

You can format table column using various string functions. For example you can make any table column content to uppercase, first letter uppercase, lowercase or you can add prefix, suffix etc.

  
                                    $pdocrud = new PDOCrud();
                                    //Add prefix (e.g. Mr.) in first name
                                    $pdocrud->tableColFormatting("first_name", "string",array("type" =>"prefix","str"=>"Mr. "));
                                    //make firstname upper case
                                    $pdocrud->tableColFormatting("first_name", "string",array("type" =>"uppercase"));
                                     //make lastname lower case
                                    $pdocrud->tableColFormatting("last_name", "string",array("type" =>"lowercase"));
                                     //Add suffix
                                    $pdocrud->tableColFormatting("Address", "string",array("type" =>"suffix","str"=>" "));

                                echo $pdocrud->dbTable("employee")->render();
                            

String based table content formatting

Employee

Showing 1 to 10 of 51 entries

# Id First name Last name Address City State Zip Actions
1 53 MR. LUIS MARTINS opit Ap #190-9800 Facilisi. Rd. Bowling Green ME 29061300
2 138 MR. MAX mustermann Selzen Selzen Kapellenstraße 55278
3 137 MR. Y o bario San Luis pue 5700
4 58 MR. ZENA fox 9604 Dolor Road Palm Springs WA 93143
5 59 MR. BRITANNIE schmidt 485-6357 Dictum Road Bradbury VT 48121
6 61 MR. MADESON2 robbins P.O. Box 690, 861 Magna. Avenue Bismarck MN 37748
7 62 MR. EMILY richmond P.O. Box 629, 2724 Velit. Av. Las Cruces VA 34490
8 63 MR. DAMIAN wilson Ap #209-5365 Pulvinar Road Boulder ND 37920
9 130 MR. SASA kuku sakuku
10 65 MR. IGOR gutierrez 192-1646 Hendrerit. St. Chicopee CT 94701
# Id First name Last name Address City State Zip Actions