protected static normalizeCheckBoxAndRadio ( string $input ) : array | ||
$input | string | the inputs. |
return | array | an array with the following structure: array($hidden, $input) |
protected static function normalizeCheckBoxAndRadio($input)
{
$parts = preg_split("/(<.*?>)/", $input, 2, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
if (isset($parts[1])) {
return $parts;
} else {
return array('', $parts[0]);
}
}