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

# Id First name Last name Address City State Zip Actions
1 50 MR. NOLAιεθρθθ rojasgghhhξσξσηηδ Ap #185-9503 Sed Drive Juneau NH 77099
2 51 MR. TALON rowland 4575 Massa. Street Marquette IN 37429
3 52 MR. CHERYL bowers 1348 Ut Rd. Hutchinson IL 44144
4 53 MR. BREE gaines Ap #190-9800 Facilisi. Rd. Bowling Green ME 623918
5 56 MR. JASPER santiago 2990 Malesuada Rd. Williamsport IL 00409
6 57 MR. HILARY conner 2000 Diam. Rd. Roanoke MN 50683
7 58 MR. ZENA fox 9604 Dolor Road Palm Springs WA 93143
8 59 MR. BRITANNI schmidt 485-6357 Dictum Road Bradbury VT 48121
9 60 MR. CALE lynn Ap #318-2121 Sapien Rd. Kettering MS 74815
10 61 MR. MADESON robbins P.O. Box 690, 861 Magna. Avenue Bismarck MN 37748
# Id First name Last name Address City State Zip Actions