Forum Moderators: coopster
Here's the code; I want the source code to have a break after each radio button. $i comes from the for loop that runs this code (it runs several times, so I made it a for loop to avoid repetitive code).
$selected = " checked='checked'";
if($sunday == $i){$sun_selected = $selected;}
if($monday == $i){$mon_selected = $selected;}
if($tuesday == $i){$tue_selected = $selected;}
if($wednesday == $i){$wed_selected = $selected;}
if($thursday == $i){$thu_selected = $selected;}
if($friday == $i){$fri_selected = $selected;}
if($sat== $i){$sat_selected = $selected;}
echo "<label>Sun</label><input type='radio' name='sun' value='$i'$sun_selected/> ";
echo "<label>Mon</label><input type='radio' name='mon' value='$i'$mon_selected/> ";
echo "<label>Tue</label><input type='radio' name='tue' value='$i'$tue_selected/> ";
echo "<label>Wed</label><input type='radio' name='wed' value='$i'$wed_selected/> ";
echo "<label>Thu</label><input type='radio' name='thu' value='$i'$thu_selected/> ";
echo "<label>Fri</label><input type='radio' name='fri' value='$i'$fri_selected/> ";
echo "<label>Sat</label><input type='radio' name='sat' value='$i'$sat_selected/> "; Thanks!
echo "<label>Sun</label><input type='radio' name='sun' value='$i'$sun_selected/> \n";
echo "<label>Mon</label><input type='radio' name='mon' value='$i'$mon_selected/> \n";
You are already, but make sure you use double quotes not single quotes for your string in this case or they won't be expanded and create new lines...
You should really be able to put \n\n\n\n\n\n\n and have the radio buttons display on the same line in the browser even though there is huge white-space in the HTML source code.
If you are still having issues, please explain a bit more...