Click to See Complete Forum and Search --> : unexpected T_CONSTANT_ENCAPSED_STRING


Che
02-14-2005, 07:48 PM
Hello all,

I'm going crazy with this error. Need help badly...

I don't understand why I'm getting this error:

[client 000.00.000.000] PHP Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /xcvb/vfgdh/dfgh/dfgd/fgdfg/hjkhj/in-house/che/Netview_Final/netviewFinalschecklist/test_netview/pages/altered_title.php on line 187, referer: http://webserver/dfgh/dfgd/fgdfg/hjkhj/che/Netview_Final/netviewFinalschecklist/test_netview/pages/altered_title.php


This is the script in question, line 187 is the echo statement:

if (defined( $abbrName )){
if (defined( $CanPath )){
$result = mysql_query( "select SerialNo, DisplayName, DirFileName from navlinks_$abbrName where ParentNo=0 order by OrderNumber, DisplayName" ) or die( "Invalid query: " . mysql_error() );
while ( list( $ProjectName, $CanPath, $abbrName ) = mysql_fetch_row( $result ) )
{
echo "<li id='nav'><a href='#'>" . $CanPath . "</a></li>";

}
mysql_free_result( $result );
}
}

Any help is GREATLY appreciated...

BeachSide
02-15-2005, 01:00 AM
while ( list( $ProjectName, $CanPath, $abbrName ) = mysql_fetch_row( $result ) )

it looks like you need a double equals sign ==

while ( list( $ProjectName, $CanPath, $abbrName ) == mysql_fetch_row( $result ) )

Che
02-15-2005, 10:42 AM
Thank you for your reply!

No, I am actually populating those three variables with the contents of $result.

BeachSide
02-15-2005, 12:22 PM
nevermind me I was about half asleep when I looked at it :o