php分配2个变量来形成value元素

Is there a way to assign 2 variable values to a value in a form:

echo "  <input name='Radio1' type='radio' value='$course_id . $date_1'/>$date_1</br>";

This would be what you are looking for:

echo "  <input name='Radio1' type='radio' value='$course_id$date_1'/>$date_1</br>";

Or in a more readable way:

echo "  <input name='Radio1' type='radio' value='".$course_id.$date_1."'/>$date_1</br>";

Regards,

STEFAN

You could do this:

echo '<input type="radio" name="Radio1" value="',$course_id,'_',$date_1,'" />',$date_1,'<br />';

On the receiving page:

$parts = explode('_',$_GET['Radio1']);
$course_id = $parts[0];
$date = $parts[1];

This way has the data separated in perhaps a more useful way:

<input type="text" name="course[$course_id]" value="$date_1" />

you can use printf

$input = "<input name='Radio1' type='radio' value='%s%s'/>%s</br>";
printf ( $input, $course_id, $date_1, $date_1 );