Skip to content

Kirby 3.5.7.1

r()

Smart version of return with an if condition as first argument

r(mixed $condition, mixed $value, mixed $alternative = null): mixed

Parameters

Name Type Default Description
$condition * mixed
$value * mixed The string to be returned if the condition is true
$alternative mixed null An alternative string which should be returned when the condition is false

Return type

mixed