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 92 entries

# Id First name Last name Address City State Zip Actions
1 105 garyZZZ ason 143 Pullman ave. chicago illinois 91391
2 12 Ocean Welch Ap #328-4231 Aliquam Ave Durango MN 34848
3 13 Olympia Reid Ap #119-6421 Vulputate St. Laconia AL 42649
4 14 Leigh Madden 1134 Commodo St. Jeannette IN 64702
5 15 Jenna Sims Ap #188-3087 Semper Rd. White Plains CO 51000
6 16 Marsden Mcknight 891-2555 Ligula Av. Peekskill VT 38453
7 17 Demetria Mooney Ap #400-7304 Vehicula Ave Signal Hill GA 32448
8 18 April Copeland P.O. Box 940, 1713 Nunc Rd. White Plains CA 98831
9 19 Jason Hale Ap #667-483 Vulputate, St. Ventura SC 09689
10 20 Tana Malone 640-9421 Arcu. Avenue Modesto CA 90815
# Id First name Last name Address City State Zip Actions