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 5 of 94 entries

# Id First name Last name Address City State Zip Actions
1 11 MR. SUSAN floyd less 2138 Mauris Rd. Kent SD 94619
2 12 MR. OCEAN welch Ap #328-4231 Aliquam Ave Durango MN 34848
3 13 MR. OLYMPIA reid Ap #119-6421 Vulputate St. Laconia AL 42649
4 14 MR. LEIGH madden 1134 Commodo St. Jeannette IN 64702
5 15 MR. JENNA sims Ap #188-3087 Semper Rd. White Plains CO 51000
# Id First name Last name Address City State Zip Actions