I want to print a text field 6 times, however if all of them are filled then the loop should not continue. Here's my code:
<fieldset class="keywords">
<?php
$fkeywords = get_the_terms($pid, 'fkeywords');
if (is_array($fkeywords)) {
foreach ($fkeywords as $keyword) {
echo '<input type="text" name="fkeywords[]" id="'.$keyword->slug.'" value="'.$keyword->slug.'">';
}
}
?>
<ol>
<?php for ($i=0; $i<6; $i++ ){ ?>
<li><input type="text" size="20" name="foodir_keywords[]" /></li>
<?php } ?>
</ol>
</fieldset>