Answer the question
In order to leave comments, you need to log in
How to make each object in a span?
Hello everyone, I'm not strong in php, so I would like to hear some advice ...
There is a code:
<?php if ($options) { ?>
<div class="options">
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'radio') { ?>
<div class="options_color">
<h2 class="heading_descriptions">
<?php echo $option['name']; ?>:
</h2>
<span class="text_descriptions" >
<?php foreach ($option['option_value'] as $option_value) { ?>
<input type="radio"/>
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>">
<?php echo $option_value['name']; ?>
</label>
</span>
</div>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
Answer the question
In order to leave comments, you need to log in
Like so:
<?php if ($options) { ?>
<div class="options">
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'radio') { ?>
<div class="options_color">
<h2 class="heading_descriptions">
<?php echo $option['name']; ?>:
</h2>
<?php foreach ($option['option_value'] as $option_value) { ?>
<span class="text_descriptions" >
<input type="radio"/>
<label for="option-value-<?php echo $option_value['product_option_value_id']; ?>">
<?php echo $option_value['name']; ?>
</label>
</span>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question