There must be a kazillion topics and help related to this, but I cannot figure out how to implement anything to work with my setup.
HTML:
<!-- SHOW/HIDE TEXT FIELD -->
<!-- IF BITTEN ANIMAL="YES" or BITTEN "BOTH" Show Field -->
<div id="hidden_textfield10" style="display:none;">
<p class="data_bold">What kind of animal</p><div class="data_small">What kind of animal has your pet bitten? Check all that apply:</div>
<label for="Wild"><input class="form_style" type="checkbox" value="Wild" id="Wild" name="whatKindofAnimal[5]" />Wild</label><br />
<label for="Bird"><input class="form_style" type="checkbox" value="Bird" id="Bird" name="whatKindofAnimal[4]" />Bird</label><br />
<label for="Cat"><input class="form_style" type="checkbox" value="Cat" id="Cat" name="whatKindofAnimal[3]" />Cat</label><br />
<label for="Dog"><input class="form_style" type="checkbox" value="Dog" id="Dog" name="whatKindofAnimal[2]" />Dog</label><br />
<label for="Other-Animal"><input class="form_style" type="checkbox" id="Other-Animal" name="whatKindofAnimal[1]" onclick="if(!this.checked) document.getElementById('otherKindofAnimal').value='' " />Other</label>
<!-- IF BITTEN ANIMAL="Other" Show Field -->
<div class="Other-Animal" style="display:none;">
<input class="form_style" type="text" placeholder="Please Specify" id="otherKindofAnimal" name="whatKindofAnimal[1]" />
</div>
<!-- END "Other" Field -->
PHP:
<strong>What Kind of Animal:</strong> <?php $name =
$whatKindofAnimal = implode(", ", $_POST['whatKindofAnimal']); {echo
htmlspecialchars($whatKindofAnimal);} ?></p>
I know the name is the same for the last radio button and the textbox, but this works for my setup and is irrelevant with my dilemma. Disregard the HTML.
How do I correct the php to remove that last comma?
Thanks!!! Tracy