php - echo multiple variables with a space between each into echo'd table cell -
<?php if(isset($_session['guest2first'])) echo '<tr><td>'; echo '<input type="text" name="guest2ticket" id="guest2ticket" onblur="isticketnumber(this)" size ="22"/>'; echo '</td><td>'; echo $first["guest2first"] , ' ', $middle["guest2middle"] , ' ',$last["guest2last"]; echo '</td></tr>'?>
i have form uses $_session variables fill in of content using code above.
what need
check if variable set if echo out new table row containing 2 cells in first cell echo out input box in sec cell echo out 3 variables space between eacheverything seems work fine except number 4. nil is echo'd sec cell.
im sure
echo $first["guest2first"] , ' ', $middle["guest2middle"] , ' ',$last["guest2last"];
is problem. how can prepare syntax accomplish desired result?
i think mixed var names , mean $_session, instead of $first, $middle, $last
<?php if(isset($_session['guest2first'])) echo '<tr><td>'; echo '<input type="text" name="guest2ticket" id="guest2ticket" onblur="isticketnumber(this)" size ="22"/>'; echo '</td><td>'; echo $_session["guest2first"] , ' ', $_session["guest2middle"] , ' ',$_session["guest2last"]; echo '</td></tr>'?>
php echo
No comments:
Post a Comment