02 January, 2011

PHP ToString - PHP variable to string

How to convert value of a PHP variable to string.

There are three methods

Typecasting:
$var = (string)$var;

StringValue:
$var = strval($var);

SetType:
$var = settype($var, 'string');

No comments:

Post a Comment