Jump to content

[SOLVED] Spacing record set


Hamish

Recommended Posts

Hi All,

 

Newbie first post just starting to learn PHP and MyQL

 

I have been trying to get my head round the following and hope you can help.

 

Below is a line from the result of a query which I would like to print to screen in a table, the line in question should display i.e.<br> “Mr Peter Williams” spacing the record at present it prints MrPeterWilliams.

 

What is the correct syntax to use to space out the name correctly?

 

echo(“<td>” . $rec[“PLTitle”] . $rec[“PLFirstName”] . $rec[“PLSName”] . “</td>”);

 

Regards

Hamish

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/47271-solved-spacing-record-set/
Share on other sites

Thanks  both for the very prompt reply and solution.

Easy when you know how.

Difficult to find when you don't know what you're looking for!

On a similar theme.

 

How would the same output

 

echo("<td>" . $rec["PLTitle"] . " " . $rec["PLFirstName"] . " " . $rec["PLSName"] . "</td>");

 

be printed out on seperate lines

ie

Mr

Peter

Williams

 

Thanks Again

 

Hamish

 

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.