Posted by Disco Octopus on 09/26/70 11:43
Jim Michaels wrote:
> "Disco Octopus" <discooctopus@yahoo.com> wrote in message
> news:kenkjdfz58h8$.yj85d8ygh72.dlg@40tude.net...
>> Jim Michaels wrote:
>>
>>> C:\prj\quiz\withusers>php tareports.php
>>> PHP Parse error: syntax error, unexpected T_ELSE in
>>> C:\prj\quiz\withusers\tareports.php on line 205
>>>
>>>
>>> this is the section of code.
>>>
>>> if (isset($row4)) {
>>> if (isset($row5)) { //answer given?
>>> if ($row4['answer_tag']==$row5['answer_tag']) {
>>> ?>
>>> <div class=answer>Answer:<br />
>>> <?php echo $row4['answer_tag']; ?>. <?php echo $row5['answer']; ?><?php
>>> if
>>> ($row5['is_img']) { ?><img src="<?php echo getconfigvar("basepath");
>>> ?>viewraimg.php?id=<?php echo $row5['answer_id']; ?>" /><?php } ?>
>>> </div>
>>> <br />
>>> <?php
>>> $ncorrect++;
>>> } else { //no answer or answer is wrong
>>
>> ----------------^
>> ... this char here
>
> the open curly bracket? that's a standard if construct.
> if () {
> } else {
> }
> am I not doing this right? I don't see it.
>
This was the first part of my response...
>>
>>
>>> ?>
>>> <div class=answer>Answer 1:<br />
>>> <?php echo $row5['answer_tag']; ?>. <?php echo $row5['answer']; ?><?php
>>> if
>>> ($row5['is_img']) { ?><img src="<?php echo getconfigvar("basepath");
>>> ?>viewraimg.php?id=<?php echo $row5['answer_id']; ?>" /><?php } ?>
>>> </div>
>>> <div class=answer>Answer 2:<br />
>>> <?php echo $row4['answer_tag']; ?>. <?php echo $row4['answer']; ?><?php
>>> if
>>> ($row4['is_img']) { ?><img src="<?php echo getconfigvar("basepath");
>>> ?>viewraimg.php?id=<?php echo $row4['answer_id']; ?>" /><?php } ?>
>>> </div>
>>> <br />
>>> <?php
>>> $nwrong++;
>>> }
>> --------^
>> ... is ended by this one here, therefore an else is not expected here...
>>
I think you may have missed the *second* part of my responce to you.
--
freeball
Navigation:
[Reply to this message]
|