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
https://forums.phpfreaks.com/topic/243414-displaying-text-with-varibles/
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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.