Welcome Guest, Not a member yet? Register   Sign In
Random anchors being generated. Cant find....
#1

[eluser]rvent[/eluser]
Hello,

I am having this problem where 2 of my pages are not being properly rendered under IE. After looking at the code with the developer tools for chrome and IE i noticed that extra anchors were being added to the view.

Code in the products.php view file:
Code:
<div id="product_wrapper">

        <div id="product_content">
            &lt;?php for($i = 0; $i <= count($items) - 1; $i++) :?&gt;
                <div id="product_item" class="product_row">
                    <a >itemId;?&gt;>
                    <img >itemIcon ;?&gt; alt="">
                    <h3>&lt;?php echo $items[$i]->itemName;?&gt;</h3>
                    <p>&lt;?php echo $items[$i]->itemShortDesc;?&gt;</p>
                </div>    
            &lt;?php endfor;?&gt;
        </div>
    
    </div>

If i do "view source" or select the script tab in dev tools, i see the correct HTML, however when i switch to the "Elements" tab, it shows those random anchors being added, which messes up my page.

Any ideas...?

Thanks
#2

[eluser]oppenheimer[/eluser]
It looks like you have some hanging php close marks ?&gt;
The first two lines after <div id="product_item">
I'm not sure the code would work without that so, is this an accurate copy/paste of the code?
#3

[eluser]rvent[/eluser]
That was removed by the rendering engine for the forums...

But i figured it out. It was that i missed the closing tags for my anchors.

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB