note 87737 added to function.stristr
| From: | tomas dot nesrovnal at yourspirit dot cz | Date: | Thu, 18 Dec 2008 20:36:26 +0000 |
| Subject: | note 87737 added to function.stristr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148330@lists.php.net to get a copy of this message | ||
Active item item in menu:
<?php
function aim($page) {
if(stristr($_SERVER['REQUEST_URI'], $page)) {
return ' class="active"';
}
}
?>
usage:
<style type="text/css">
.active {color: red;}
</style>
<?php
print '<a href="http://example.com/page/hello-world/"'.
aim('hello-world') .'>HW</a>';
?>
----
Server IP: 64.71.164.2
Probable Submitter: 83.208.153.155
----
Manual Page -- http://www.php.net/manual/en/function.stristr.php
Edit -- https://master.php.net/note/edit/87737
Del: integrated -- https://master.php.net/note/delete/87737/integrated
Del: useless -- https://master.php.net/note/delete/87737/useless
Del: bad code -- https://master.php.net/note/delete/87737/bad+code
Del: spam -- https://master.php.net/note/delete/87737/spam
Del: non-english -- https://master.php.net/note/delete/87737/non-english
Del: in docs -- https://master.php.net/note/delete/87737/in+docs
Del: other reasons-- https://master.php.net/note/delete/87737
Reject -- https://master.php.net/note/reject/87737
Search -- https://master.php.net/manage/user-notes.php