Jump to content

Displaying text with varibles !!


popcop

Recommended Posts

im havin a problem with displaying some text with data from the database

 

the text on my page should display like this example :

 

John Smith thinks that this will happen on Wednesday 14th August 2011

 

 

this is the code i have

  echo "<tr class='$class'>";

  echo "<td>" . $row['firstname'] . . $row['firstname'] . "thinks that this will happen on " . $row['date'] . "</td>";

  echo "</tr>";

 

hope you can help

Link to comment
Share on other sites

What error messages, if any are you getting?

 

Here is how You could try formatting the code if you like..

 

echo '<tr class="$class">';
echo "<td>".$row["firstname"]." ".$row["firstname"]." thinks that this will happen on ".$row["date"]."</td>";
echo "</tr>";

 

Does that work?

Link to comment
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.