Str

Converts a value into a string.

Syntax

Str( Value );

Parameters

Parameter Name Type Description Optional? Default Value
Value String The value to convert into a string. No n/a

Output

Returns the supplied value converted into a string.

Use Case

As discussed earlier in this guide, the Expression Engine automatically converts non-string values into strings when needed in that format. For that reason, there is little need for you to use this function, but it is useful to be aware of the function for circumstances when values need to be converted to strings manually.