Hi
If this is the full code you are missing the final } to close the function
I find it helps to comment the closing brackets
HTH
Peter
function dtb_qry_tbl_dsp($qry, $qry1, $qry2)
{
$result = mysql_query($qry);
$result1 = mysql_query($qry1);
$result2 = mysql_query($qry2);
$i = 0;
$k = 0;
while(($row = mysql_fetch_row($result, $result1, $result2)))
{
echo "<table>";
for($i; $i < count($row); $i++)
{
echo "<tr>";
for($k; $k <= count($row["$i"]); $k++)
{
echo
"<td>".htmlspecialchars(stripslashes($row["$i,$k"]))."</td>";
}//end inner for loop
echo "</tr>";
}//end outer for loop
echo "</table>";
}//end while
}//missing end function bracket
-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
-----------------------------------------------
-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
-----------------------------------------------
-----Original Message-----
From: Randy Hammons [mailto:rathlon1@;cox.net]
Sent: 26 October 2002 18:45
To: mysql
Subject: mysql access via php function, hlp with syntax
Can someone please tell me what is wrong with this function? I can't for
the life of me see an error. But, for some reason I keep getting the
following error:
PARSE ERROR: parse error, unexpected $ in
"d:\web.root\xx_db\inc\functions1.inc on line 28
function is:
function dtb_qry_tbl_dsp($qry, $qry1, $qry2)
{
$result = mysql_query($qry);
$result1 = mysql_query($qry1);
$result2 = mysql_query($qry2);
$i = 0;
$k = 0;
while(($row = mysql_fetch_row($result, $result1, $result2)))
{
echo "<table>";
for($i; $i < count($row); $i++)
{
echo "<tr>";
for($k; $k <= count($row["$i"]); $k++)
{
echo "<td>".htmlspecialchars(
stripslashes($row["$i,$k"]))."</td>";
}
echo "</tr>";
}
echo "</table>";
}
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php