Is there away to break out of an echo statment without having to close off ie:
Code: Select all
<td><input name="first" type="text" value="'.$first.'"> '.( if(!$first){ ' *'; } ).'</td>Thanks
Moderator: General Moderators
Code: Select all
<td><input name="first" type="text" value="'.$first.'"> '.( if(!$first){ ' *'; } ).'</td>Code: Select all
echo '<td><input name="first" type="text" value="'.$first.'"></td>';
if(!$first){ echo ' *'; }
echo '<td><input name="last" type="text" value="'.$last.'"></td>';
if(!$last){ echo ' *'; }Code: Select all
echo '<td><input name="first" type="text" value="'.($first ? $first : '*').'"></td>';
echo '<td><input name="last" type="text" value="'.($last ? $last : '*').'"></td>';Code: Select all
<td><input name="first" type="text" value="'.$first.'">'.($first ? '' : ' *').'</td>