Welcome Guest, Not a member yet? Register   Sign In
anchor() generates wrong links?
#21

[eluser]TheFuzzy0ne[/eluser]
I see no echo statements:
Code:
<ul id="newsPosts">    
    &lt;?php if ($verify['available'] === TRUE) : ?&gt;
        &lt;?php foreach($news as $row): ?&gt;
            &lt;ul>
                &lt;li><h1>&lt;?php echo $row['title']; ?&gt;</h1></li>
                &lt;li><h2>Posted by &lt;?php echo $row['user']; ?&gt; on &lt;?php echo $row['date']; ?&gt;</h2></li>
            &lt;?php if($row['image'] != ""): ?&gt;
                &lt;li class="post_body"><img src="&lt;?php echo $row['image']; ?&gt;">&lt;?php echo $row['text'] . anchor($row['archive'], '(read more)'); ?&gt;</li>
            &lt;?php else: ?&gt;
                &lt;li class="post_body">&lt;?php echo $row['text'] . anchor($row['archive'], '(read more)'); ?&gt;&lt;/li>
            &lt;?php endif; ?&gt;
            &lt;/ul>
        &lt;?php endforeach; ?&gt;
    &lt;?php else: ?&gt;
          &lt;?php echo $verify['message']; ?&gt;
    &lt;?php endif; ?&gt;
</ul>
The above code is untested, but should hopefully get you back on the right track.

I've compacted it a bit, and (in theory) made it easier to follow by using the alternative construct syntax, and I got rid of the short tags (even though you're free to replace them). I also noticed that you had an extra opening &lt;ul> in there, and so I removed it.


Messages In This Thread
anchor() generates wrong links? - by El Forum - 02-04-2009, 09:18 AM
anchor() generates wrong links? - by El Forum - 02-04-2009, 10:37 AM
anchor() generates wrong links? - by El Forum - 02-04-2009, 01:52 PM
anchor() generates wrong links? - by El Forum - 02-04-2009, 01:55 PM
anchor() generates wrong links? - by El Forum - 02-04-2009, 02:15 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 08:27 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 08:41 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 08:46 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 08:57 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 09:19 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 09:25 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 09:37 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 09:48 PM
anchor() generates wrong links? - by El Forum - 02-19-2009, 10:03 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 05:40 AM
anchor() generates wrong links? - by El Forum - 02-20-2009, 07:59 AM
anchor() generates wrong links? - by El Forum - 02-20-2009, 08:04 AM
anchor() generates wrong links? - by El Forum - 02-20-2009, 11:40 AM
anchor() generates wrong links? - by El Forum - 02-20-2009, 12:12 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 12:29 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 01:18 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 01:56 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 02:33 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 06:03 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 06:35 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 06:38 PM
anchor() generates wrong links? - by El Forum - 02-20-2009, 06:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB