parse error mysql
| From: | luis at mecha dot barry dot edu | Date: | Fri, 22 Sep 2000 18:17:20 +0000 |
| Subject: | parse error mysql | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3055@lists.php.net to get a copy of this message | ||
Hi:
I am getting the following error:
Parse error: parse error, expecting
T_STRING' or T_VARIABLE' or
`T_NUM_STRING' in templates/lesson_form.php on line 87
This is the code that I am trying to implement:
$countgle = db_num_rows($qid);
$frm["glenums"] = array();
while ($gle = db_fetch_object($qid)) {
$frm["glenums"][] = $gle->glenum;
}
And this is the code that calls it (and generates the error, line 87):
<?
for ($i = 1; $i <= $countgle; $i++):
echo "<INPUT TYPE=text NAME=glenum[] VALUE=\"$frm["glenums"][$i]\"
SIZE=60>
MAXLENGTH=14>\n";
endfor;
?>
Anybody have any ideas? I am getting it to work by going outside of the $frm
["glenums'] array, but I would like to make it work from $frm...
I just don't know what the HAY these lines do:
$frm["glenums"] = array();
while ($gle = db_fetch_object($qid)) {
$frm["glenums"][] = $gle->glenum;
}
Can anybody explain this before I go bald (yes, I am pulling my hair out!!)
luis
---------------------------------------------
This message was sent using Mecha WebMail.