Welcome Guest, Not a member yet? Register   Sign In
unexpected 'else'
#1

How to fix this error?

Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\innovationci3\application\views\cms\index.php on line 147
A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected 'else' (T_ELSE)
Filename: cms/index.php
Line Number: 147
Backtrace:


views/cms/index.php


PHP Code:
<b>Latest Projects:</b><br><br>

<
img src="<?php echo base_url('images/large_pic.jpg');?>" width="200px">&nbsp&nbsp<img src="<?php echo base_url();?>images/large_pic3.jpg" width="200px">&nbsp&nbsp<img src="<?php echo base_url();?>images/large_pic4.jpg" width="200px">&nbsp&nbsp<img src="<?php echo base_url();?>images/large_pic5.jpg" width="200px" height="165px">

     
            <?
php if(isset($images)) : ?>
                <?php foreach ($images as $image) : ?>
                    <?php 
                    
//do whatever you need with each image
                    
echo "images";
                    
?>
                <?php // endforeach; ?>
                
            <?php else : ?>
                    <?php
                    
// determine what to do if there are no images
                    
echo "else images";
            
?>
            <?php endif; ?>
            
            <?php
                
foreach ($images as $image) :
            
?>        
                   <!-- <li>
                        <span class="zoom">
                            <img  src="http://www.purelineliving.com/public/thumb.php?src=<?php echo $rec->src;?>&w=800&h=800&zc=1">
                        </span>
                    </li> -->
                    <?php echo "images"?>
            <?php
                
//endforeach; 
            
?>


<br><br><br> 


line 147:  <?php else : ?>
" If I looks more intelligence please increase my reputation."
Reply
#2

<?php// endforeach;?> why comment?
Keep calm.
Reply
#3

<?php foreach ($todo as $item):?>
<li><?=$item?></li>
<?php endforeach; ?>
Keep calm.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB