Array not working
| From: | Chris Blake | Date: | Tue, 18 Feb 2003 07:45:55 +0000 |
| Subject: | Array not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135962@lists.php.net to get a copy of this message | ||
Greetings all,
My database has one table with three fields i.e. ClientID, ClientName
and Distance .
I`m trying to get all the field data printed to a form but whenever I
try to add the "ClientID" and "Distance" fields to the code below it
bombs out with the following error :
Parse error: parse error in /home/data/ClientWebs/chrisplay/main.php on
line 27
Full code is below :
<?php
//Connect to DB
include("inc_ConnectDB.php") ;
//Make SQL Statement
$SqlGetClient = "Select * from Client" ;
$ResGetClient = mysql_query($SqlGetClient) ;
//If any errors then print `em out
if (!$ResGetClient)
{
echo("<P>Error performing query: " . mysql_error() .
"</P>");
exit();
}
//While there are records to fetch.....
while ( $row = mysql_fetch_array($ResGetClient) )
{
// THIS IS LINE 27
//....print them out to page
echo $row['ClientID'].['ClientName'].['Distance'].
'<hr>';
}
?>
Muchos grassy-arse for any assistance......
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
It is reported that somewhere in the world, every 15 seconds, a woman
gives birth to a child. She must be found and stopped.