Generate Select Options Using Php Arrays
I have a 'state' category select that displays one of 4 'carrier' selects based on the state chosen. I want php to populate the 'carrier' selects with their respective options. I h
Solution 1:
Maybe this will fix it
$options = '';
foreach($company_arry as $company) {
$options .= "<option value='" . $company['Id'] . "'>" . $company['Name'] . "</option>";
}
echo $options;
Post a Comment for "Generate Select Options Using Php Arrays"