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

# Id First name Last name Address City State Zip Actions
1 118 MR. JEELYN frayres Brgy. Sto. Tomas Calauan Philippines 4012x
2 119 MR. CARLOS santiago 20 rue des plantes Lisboa Portugal 2222-222
3 15 MR. JENNA sims Ap #188-3087 Semper Rd. White Plains CO 51000
4 117 MR. TESDTZ twer<sdf s<r rtdg fgfdgdgh fchb
5 18 MR. APRIL copeland P.O. Box 940, 1713 Nunc Rd. White Plains CA 98831
6 19 MR. JASON hale Ap #667-483 Vulputate, St. Ventura SC 09689
7 21 MR. BOI andrews Ap #775-8997 Nunc Avenue Juneau Paneleiro GA 18307
8 22 MR. STONE kirkland P.O. Box 686, 9425 Morbi Road Colorado Springs UT 93246
9 23 MR. EDWARD burton 5310 Vel, Avenue Harrisburg AK 15122
10 24 MR. ADAM ramsey 6383 Euismod Road Fulton AZ 14148
# Id First name Last name Address City State Zip Actions