Coding Question: values from an array
| From: | Mark McCray | Date: | Sat, 29 Jul 2000 18:20:01 +0000 |
| Subject: | Coding Question: values from an array | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1624@lists.php.net to get a copy of this message | ||
Hey there,
I'm querying a mysql database. I'm getting one row returned and putting it
into an array. I think want to display the contents of the array.
I'm using the echo command to do it like this:
echo $mdisp['fname'];
And this command works just find.
But why when I do it like this:
echo "$disp['fname']";
do I get the error message:
Parse error: parse error, expecting
T_STRING' or T_VARIABLE' or
`T_NUM_STRING' in /u04/httpd/htdocs/new_hros_proc.php on line 21
.
I guess maybe you can't echo a row in the array?
Sorry if this a bit low level. I'm kinda new.
Thanks,
marky