Wierd print() problem
Posted: Tue Apr 20, 2004 12:04 pm
Consider the following code:
Now I know some will say I should use echo instaed, etc, but aside from that --- My concern is the two lines marked with stars, which print differently.
The first one, within the while loop, prints the way I want to
The second one does not,, and I cannot see the difference between them!
It's not printing the "&Tid=" at all. Can someone tell me what the sam hill I am missing?

Code: Select all
<?php
while($Xrow = mysql_fetch_array($Xres)) // list the transactions (usually only one, but...)
{
print("<a href="javascript:firstWindow('revtran.php?Seq=" . $row['Seq']);
* print("&Tid=" . $Xrow['id'] . "',210,410)"><img src='images/bdot.gif' border=0></a>");
print(" <span class='green-10'>");
print($Xrow['Tran'] . ", $" . $Xrow['Tamt'] . "</span>");
if (strlen($Xrow['Doc1'])) print("<br>Use " . $Xrow['Doc1']);
if (strlen($Xrow['Doc1']) && $Xrow['Amt1'] > 0.00) print(", $" . $Xrow['Amt1']);
if (strlen($Xrow['Doc2'])) print("<br>and " . $Xrow['Doc1']);
if (strlen($Xrow['Doc2']) && $Xrow['Amt2'] > 0.00) print(", $" . $Xrow['Amt1']);
print("<br>");
}
print("<a href="javascript:firstWindow('revtran.php?Seq=" . $row['Seq']);
* print("&Tid=" . $Xrow['id'] + 1 . "',210,410)"><img src='images/bdot.gif' border=0></a>");
print(" Add new transaction<br>");
?>The first one, within the while loop, prints the way I want to
Code: Select all
revtran.php?Seq=1&Tid=1Code: Select all
revtran.php?Seq=11