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

# Id First name Last name Address City State Zip Actions
1 8 MR. FLORENCE merrill 999 Eget Avenue Pawtucket AL 56012
2 9 MR. VERNONXXXXX klein Ap #638-2444 Sem. Rd. Wynne VA 14715
3 105 MR. GARY ason 143 Pullman ave. chicago illinois 91391
4 11 MR. SUSAN floyd less 2138 Mauris Rd. Kent SD 94619
5 12 MR. OCEAN welch Ap #328-4231 Aliquam Ave Durango MN 34848
6 13 MR. OLYMPIA reid Ap #119-6421 Vulputate St. Laconia AL 42649
7 1111 MR. YüKSEL aksoy Haznedar İstanbul Güngören 34610
8 15 MR. JENNA sims Ap #188-3087 Semper Rd. White Plains CO 51000
9 16 MR. MARSDEN mcknight 891-2555 Ligula Av. Peekskill VT 38453
10 17 MR. DEMETRIA mooney Ap #400-7304 Vehicula Ave Signal Hill GA 32448
# Id First name Last name Address City State Zip Actions