Why don't you try this instead:
while(list($id, $2d, $3d, $web, $prog, $tut,
$proj)=mysql_fetch_array($portfolio))
{
do whatever..
}
the list construct only works with numerical arrays and it might not like
the $section array (doesn't it get stored as number indicies AND column
names? That might generate that error).
But if you need that section array later, we can try a different approach..
ed
At 07:15 AM 5/28/2002 -0600, Jas wrote:
Hello all,
I have an error and I will be darned if I know why. Here is the code:
?php
require '/path/to/database/connection/class/db.php';
$table = portfolio;
$portfolio = mysql_query(SELECT * FROM $table,$dbh);
while ($sections = mysql_fetch_array($portfolio)) {
list($id, $2d, $3d, $web, $prog, $tut, $proj) = $sections; // I think the
error is on this line.
}
?
Then I just echo the contents of the database array like so.
?php echo $2d; ? // this is line 69
And this is the error I am recieving:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
/localhost/portfolio.php on line 169
Any help would be great!!
Jas
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Edmund Gorski
Programmer / Analyst
WWW Coordinator Dept. District Office
727-341-3181
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php