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

# Id First name Last name Address City State Zip Actions
1 208 MR. SEAN ottey 2125 N Girasol Ave Palm Springs California 92262
2 210 MR. JOHN locke Somewhere on an island LOST LOST XXX
3 211 MR. DEMOUSER demouser demouser demouser demouser 000000
4 212 MR. DEMOUSER demouser demouser demouser demouser 000000
5 213 MR. ASD sad asdsda sad asd asd
6 214 MR. ASD sad asdsda sad asd asd
7 215 MR. AJSDKL ajlksd ajksldjal Lima Nose 746531
8 216 MR. AJSDKL ajlksd ajksldjal Lima Nose 746531
9 217 MR. AJSDKL ajlksd ajksldjal Peru Nose 746531
10 219 MR. SAGAR kadel lauda lasan 9645631298413 31489496
# Id First name Last name Address City State Zip Actions