Jump to content

Recommended Posts

i have a quick question

echo "<table width='914' border='1'>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td>Welcome:<?php echo" $row['FirstName'] . " " . $row['LastName']";?> </td>
    <td>Date:<? echo date('M,d,Y'); ?></td>
  </tr>

is it posiable to do this put a new php line in the echo

 

Thanks bob

Link to comment
https://forums.phpfreaks.com/topic/178758-solved-question/
Share on other sites

yes, but not that way, you dont need to start php when php is already started... just concatenate the strings

 

 

echo "<table width='914' border='1'>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td>Welcome:". $row['FirstName'] ." ". $row['LastName']."</td>
    <td>Date:". date('M,d,Y') ."</td>
  </tr>

Link to comment
https://forums.phpfreaks.com/topic/178758-solved-question/#findComment-942947
Share on other sites

Better yet, why would you want to echo the entire table that way?  The nice thing about PHP is that you can open and close PHP tags as much as you wish. 

 

<table width='914' border='1'>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td>Welcome: <?php echo $row['FirstName'] ." ". $row['LastName']; ?></td>
    <td>Date: <?php echo  date('M,d,Y');  ?></td>
  </tr>

 

That is my personal preference anyway in most cases.

Link to comment
https://forums.phpfreaks.com/topic/178758-solved-question/#findComment-942959
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.