note 66332 added to function.str-replace

From: Date: Fri, 19 May 2006 10:15:59 +0000
Subject: note 66332 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-111669@lists.php.net to get a copy of this message
Made a simple function to create a hover effect with css, for the page you are viewing: <?php $pageview = "page2"; function menu_hover($page, $menu) { print $content = str_replace("<li><a name=\"$page\"", "<li id=\"active\"><a name=\"$page\"", "$menu"); } $content = "<li><a name=\"page1\" href=\"index.php\">page 1</a></li> <li><a name=\"page2\" href=\"about.php\">page 2</a></li> <li><a name=\"page3\" href=\"portfolio.php\">page 3</a></li>"; menu_hover($pageview,$content); ?> ---- Server IP: 83.137.200.2 Probable Submitter: 193.216.79.193 ---- X-Spam-Status: No, hits=3.7 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_60_70,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/note/edit/66332 Del: integrated -- http://master.php.net/note/delete/66332/integrated Del: useless -- http://master.php.net/note/delete/66332/useless Del: bad code -- http://master.php.net/note/delete/66332/bad+code Del: spam -- http://master.php.net/note/delete/66332/spam Del: non-english -- http://master.php.net/note/delete/66332/non-english Del: in docs -- http://master.php.net/note/delete/66332/in+docs Del: other reasons-- http://master.php.net/note/delete/66332 Reject -- http://master.php.net/note/reject/66332 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111669) next »