Welcome Guest, Not a member yet? Register   Sign In
foreach problem
#3

[eluser]umefarooq[/eluser]
hi your problem is solved dont put start and ending {} for the foreach loop if you are using either use this

[/code]
<?php
foreach($filename as $k => $v): ?>
<li><img src="&lt;?php echo base_url().$path.$v; ?&gt;"></li>
&lt;?php endforeach; ?&gt;
Code:
or use this
&lt;?php
foreach($filename as $k => $v) { ?&gt;
<li><img src="&lt;?php echo base_url().$path.$v; ?&gt;"></li>
&lt;?php } ?&gt;
[code]

every thing will be fine.


Messages In This Thread
foreach problem - by El Forum - 01-25-2009, 08:13 AM
foreach problem - by El Forum - 01-25-2009, 09:48 AM
foreach problem - by El Forum - 01-25-2009, 02:26 PM
foreach problem - by El Forum - 01-25-2009, 11:45 PM
foreach problem - by El Forum - 01-25-2009, 11:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB