I have a large file with line breaks and spaces. The file has text like as follows
Ampex
Baofeng
JBL
Pioneer
Sony
1 BY ONE
To read the file i wrote this
$array = explode("\n", file_get_contents('brands.txt'));
foreach($array as $line) {
$html_code = '<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked>
<label class="form-check-label d-flex justify-content-between align-items-center" for="exampleRadios1">'.
$line
.'<span class="badge bg-primary rounded-pill">1</span>
</label>
</div>';
echo $html_code;
echo '<pre>';
//print_r($line);
echo '</pre>';
}
however my html output has an extra radio with value 1 after output the correct value. How can i output the correct value without the 1 showing as a radio button value?
