How to Convert Boolean to String

Simplest solution:

$converted_res = $res ? 'true' : 'false';

Leave a Comment