PDA

View Full Version : Format My Outputted Data From PHP



tomyknoker
04-16-2007, 02:14 AM
I am trying to format the data that is pulled from my database, but aren't having much luck. By putting my ';' on the following line it has managed to put each new query on a seperate line, but I want to bold some of the headings and also put the 'Name' on a line by itself... What am I doing wrong?


else {

while ($qry = mysql_fetch_array($results)) {
if (strtotime($qry['loginDateTime']) <= (time() + 86400*31)) {
$login .= ' <strong>Name</strong><br> '.$qry["FirstName"].' '.$qry["LastName"].' Application Date:'.date("d/m/Y", strtotime($qry["JoinDate"])).' '.$qry["Email"].' '.$qry["rep_Firstname"].' '.$qry["rep_Lastname"].' ('.$qry["State"].')
--------------------
';
}
}

$message = <<<HERE
The login information is as follows:
-----------------------------------------

$login
HERE;

$from = "me@mydomain.com";

mail($to, $subject, $message, 'From: '.$from);
}