Simplest solution:
$converted_res = $res ? 'true' : 'false';
More Related Contents:
- How can I get a hex dump of a string in PHP?
- Remove new lines from string and replace with one empty space
- PHP, get file name without file extension
- URL Friendly Username in PHP?
- PHP: Split string [duplicate]
- Mixing a PHP variable with a string literal
- PHP equivalent of .NET/Java’s toString()
- How to mimic Stack Overflow Auto-Link Behavior
- how to replace special characters with the ones they’re based on in PHP?
- How can I replace a variable in a string with the value in PHP?
- How can I truncate a string to the first 20 words in PHP?
- Remove control characters from PHP string
- Convert flat array to a delimited string to be saved in the database
- Split string by new line characters
- string sanitizer for filename
- PHP function to delete all between certain character(s) in string
- How to split a long string without breaking words?
- PHP String to Float
- How do you pull first 100 characters of a string in PHP
- How to convert a string to JSON object in PHP
- Get the first letter of each word in a string
- PHP variable interpolation vs concatenation [duplicate]
- Regex & PHP – isolate src attribute from img tag
- Delete first 3 characters and last 3 characters from String PHP
- How can I get the last 7 characters of a PHP string?
- Convert a String to Variable
- How to convert all characters to their html entity equivalent using PHP
- Format 32-character string with hyphens to become UUID
- Search and replace multiple values with multiple/different values in PHP?
- finding common prefix of array of strings