If index.php, show "this", if not, show "this"
<p>Desperately hoping someone can assist with this. I'm a novice with php. I try and self teach myself through tutorials and I've searched high and low to no avail.</p>

<p>Basically I'm looking to implement an "If index.php page, show <code>foo</code>, if not on index.php page, show <code>bar</code>"</p>

<p>Any ideas?</p>

<p>I hope I explain this well enough...</p>

<p>index.php includes a sidebar:</p>

<pre><code>require_once('./cache/templates/sidebar.php');
</code></pre>

<p>Every subsequent page is built uses what's defined in this index.php file, meaning the sidebar.php is a must.</p>

<p>I'm wanting to edit sidebar.php to contain an advert which displays solely on the index page.</p>

<p>At the moment, when I edit sidebar.php, so for instance, to display the letter "B", it will display on the homepage, and every other page like so;</p>

<p>Index Page: <a href="http://img.photobucket.com/albums/v684/nilsatis/1stack.jpg" rel="nofollow">http://img.photobucket.com/albums/v684/nilsatis/1stack.jpg</a> </p>

<p>Every other page: <a href="http://img.photobucket.com/albums/v684/nilsatis/2stack.jpg" rel="nofollow">http://img.photobucket.com/albums/v684/nilsatis/2stack.jpg</a></p>

<p>How can I dictate one area of an included file to display on one page but exclude showing on others?</p>

<p>Any assistance would be very appreciated.</p>

<p>[Edit] This is the website in question: www.grandoldteam.com . You can see where I have the text "Test" - this was entered in sidebar.php. I'd like this text (future advert) to feature only on the index page, nowhere else.</p>

<p>[Edit 2] This is the point in which sidebar.php is called in the index.php file;</p>

<pre><code>&lt;p class="page_desc"&gt;'.$PAGE['subtitle'].'&lt;/p&gt;
' );
            }

            if (isset($url[1])) require_once('./cache/html/'.$url[0].'/'.$url[1].'.php');
            else require_once('./cache/html/'.$url[0].'.php');
        }
    }

    require_once('./cache/templates/sidebar.php');



}


require_once('./cache/templates/footer.php');
</code></pre>

<p>And this is the but in which I can edit sidebar.php to display wanted text;</p>

<pre><code>&lt;div class="clear"&gt;&lt;/div&gt;
test
        &lt;/div&gt;
&lt;p&gt;
    &lt;/div&gt;
</code></pre>
