On Sun, 2011-05-01 at 09:24 +0100, e-letter wrote: > I looked at the error file located at '/var/log/httpd/error_log', > which identifies an error: > > ...Apache/2.2.6 (Mandriva Linux/PREFORK-8.2mdv2008.0) PHP/5.2.4 with > Suhosin-Patch mod_put/2.0.8 configured -- resuming normal > operations... > > ...PHP Parse error: syntax error, unexpected T_VARIABLE, expecting > ',' or ';'... > > The file was changed as follows which caused the parse error shown > above: > > <?php > $db = pg_connect('dbname=webcuttings user=httpd'); > $query = 'SELECT * FROM articles'; > $value=pg_fetch_result($query); > echo 'all files' $value; > ?> > > The file was copied from the manual page, without understanding that > an array was being used.
The problem you've got there is a missing string concatenator in your echo line. You should change that line to read: echo 'all files' . $value; note the . character? However, as you said, $value is actually an array, so you would be better of using something like print_r() or var_dump() on it. -- Thanks, Ash http://www.ashleysheridan.co.uk