Create a function

From: Date: Fri, 02 Jul 2004 00:40:58 +0000
Subject: Create a function
Groups: php.general 
Request: Send a blank email to php-general+get-189498@lists.php.net to get a copy of this message
I have a menu with a bunch of items. How can I clean up this code and push it through a function? Your basic newbie Question :) Thanks, John <p><a class="nav" href="index.html"><?php if(stristr($_SERVER["SCRIPT_FILENAME"],"index.html")) { echo "<b>Home</b>"; }else{ echo "Home"; } ?></a> <p><a class="nav" href="index.html"><?php if(stristr($_SERVER["SCRIPT_FILENAME"],"search.html")) { echo "<b>Search</b>"; }else{ echo "Search"; } ?></a>

« previous php.general (#189498) next »