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

# ID Order no Order date Customer name Order amount Order status Actions
1 172 20 0000-00-00 eeee 50 6
2 173 33 2025-09-02 Deacon Tyson 111
3 174 0 0000-00-00 Cooper Jensen 0
4 175 25 2025-09-17 Xenos Clarke 111 ok
5 176 0 0000-00-00 0
6 177 122 2025-09-03 100 OK
7 178 33 2025-09-02 Deacon Tyson 111 ok
8 179 33 2025-09-02 Deacon Tyson 111 ok
9 180 1 2025-07-01 Xenos Clarke 82325
10 181 1 2025-07-01 Xenos Clarke 82325
# ID Order no Order date Customer name Order amount Order status Actions