I am using code igniter
in order to generate elements. I want to have a form label
and an input box
on the same line.
However currently the input box is displayed below the label.
How can I ensure that the input box is on the same line as the label, and to its right.
<?php
echo form_label('Age: ','age');
echo form_input('userAge',"");
?>
Probably something like this:
echo form_label('Age: '.form_input('userAge',""),'age');
Based on your comments, this is how you force additional spaces:
echo form_label('Age: '.form_input('userAge',""),'age');
Based on your other comment:
echo form_label('Age: '.form_input(array('name'=>'userAge','value'=>'johndoe','readonly'=>'readonly')),'age');
For more information you should read through:
http://www.codeigniter.com/user_guide/helpers/form_helper.html