Outputs the HTML selected attribute.

Compares the first two arguments and if identical marks as selected.


  • Full name: selected
  • Defined in: cms/core/Shared/Helpers/core.php

Parameters

Parameter Type Description
$selected mixed One of the values to compare.
$current mixed (true) The other value to compare if not just true.
$echo bool Whether to echo or just return the string.

Return Value

string

HTML attribute or empty string