I have a function ( DoDb::printJsonDG($sql, $db, 1000, 2) ) which echos json. I have to catch it and then use str_replace() before it is send to the user. However I cannot stop it from doing echo. I don’t want to change printJsonDG because it is being used in several other locations.
I have a function ( DoDb::printJsonDG($sql, $db, 1000, 2) ) which echos json. I
Share
You can use the
ob_start()andob_get_contents()functions in PHP.Will output :