$nameParam = JRequest::getVar('name'); $firstName = JRequest::getWord($nameParam);
$namesInput = JRequest::getVar('names'); $namesArray = explode(',', $namesInput); $cleanNamesArray = array_map(function($name) { return JRequest::getWord($name); }, $namesArray);The `getVar()` method retrieves the value of the `names` input as a string. We then split the string into an array of individual names using `explode()`. Finally, we use `array_map()` to apply the `getWord()` method to each name in the array. Package library: Joomla framework.