I need to figure out how to take string “$items”, explode it into parts, and capitalize the first letter of each individual result, instead of just the first letter of the original string. Thanks in advance!
[php]//this falls under category $category_name
if($item_list) {
//get list and make radio options
$items = explode(’,’,$item_list); ?>
Choose one:
<?php
//PROBLEM BEGINS HERE, I THINK
foreach($items as $option) { ?>
<input type=“radio” name"<?php echo $category_name.'_optn'; ?>" value="<?php echo $option; ?>" id="<?php echo "sub_".$option; ?>">
<?php echo ucfirst($option); ?>
<?php /*--------
the above ucfirst($option) returns each option individually as intended, but ucfirst only applies to the first letter of the original string $items */
}//end foreach
?>