by @saigowthamr

Php: Converting String to Boolean

Home » php » Php: Converting String to Boolean

To convert a string to boolean we can use the triple equals operator === in Php.

Here an example:

$name = 'king';

$check = ($name === 'true');

Best Web Development courses