Multiple formatters php mysql server side

Multiple formatters php mysql server side

roadjanroadjan Posts: 22Questions: 6Answers: 0
    array(
        'db'        => 'some_data',
        'dt'        => 3,
        'formatter' => function( $d, $row ) {
            return str_replace(';;', '', $d);
        }
    ),

How do I add multiple formatters to this column? I first do a string replace to remove multiple semicolons (whihc works) and then I want to replace the semicolon with a <br> tag. I am assuming need multiple formatters for this column but can't find out how to do that.

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394
    Answer ✓
        'formatter' => function( $d, $row ) {
           $d = str_replace(';;', '', $d);
            $d = next_format($d);
             ......
           return $d;
    
  • roadjanroadjan Posts: 22Questions: 6Answers: 0

    Thank you @tangerine much appreciated.

Sign In or Register to comment.