PDOCrud Replace column value

Many times, we need to display different value of column than the value saved for example we save status as 0,1 and display as "Approved" "Not Approved". This can be easily achieved using the PDOCrud using tableColFormatting function and replacing the value of column.

  
                                $pdocrud = new PDOCrud(); 
                                //column_name, replace, array of value and replace value array (you can also write in one statement, rather than two)
                                $pdocrud->tableColFormatting("order_status", "replace",array("Completed" =>""));
                                $pdocrud->tableColFormatting("order_status", "replace",array("Pending" =>""));
                                echo $pdocrud->dbTable("orders")->render();
                                

Orders

Showing 1 to 10 of 16 entries

# ID Order no Order date Customer name Order amount Order status Actions
1 172 27 2025-11-04 5006 67
2 173 33 2025-09-02 Cooper Jensen 1112
3 174 0 0000-00-00 Cooper Jensen 10
4 176 0 0000-00-00 10
5 178 33 2025-09-02 Deacon Tyson 111 ok
6 179 33 2025-09-02 Deacon Tyson 111 ok
7 182 1 2025-07-01 Deacon Tyson 82325
8 184 576749678 2025-09-03 Cooper Jensen 798797 asdas
9 185 0 0000-00-00 Xenos Clarke 0 1
10 186 -1 2025-10-02 Cooper Jensen 0 ??
# ID Order no Order date Customer name Order amount Order status Actions