Jump to content

[SOLVED] PHP var not working


$username

Recommended Posts

Hello All,

    So I am working on making some code a var in PHP but it will not load correctly (not at all)

If some one could tell me if this can be done with php.

$AccountList =	while($row = mysql_fetch_array($query)) {
		"<table>
			<tr>
				<th><strong>Account ID:</strong></th>
				<th><strong>Account Name</strong></th>
			</tr>
				<tr>"
				"<th><a href=\"viewaccount.php?AccNum=".$row["AccountNumber"]."\" title=\"".$row["AccountID"]."\">".$row["AccountID"]."</a></th>"
				"<th>".$row['AccountName']."</th>
			</tr>
		</table>"};

Thank you,

Brett

Link to comment
https://forums.phpfreaks.com/topic/86911-solved-php-var-not-working/
Share on other sites

$accountList = '';
while ($row = mysql_fetch_array($query)) {
   $accountList .= "<table>
			<tr>
				<th><strong>Account ID:</strong></th>
				<th><strong>Account Name</strong></th>
			</tr>
				<tr>
				<th><a href=\"viewaccount.php?AccNum=".$row["AccountNumber"]."\" title=\"".$row["AccountID"]."\">".$row["AccountID"]."</a></th>
				<th>".$row['AccountName']."</th>
			</tr>
		</table>";
}
print $accountList;

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.