Re: preg_match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Lockie wrote:
I am trying to use this code to display a button at the root but it always displays the button. :-(

   if (! (preg_match( "/$\/index.php/", $_SERVER['PHP_SELF'] ))) {
# display a button
....

You got the end-of-string character ($) in the wrong place:
if (! (preg_match( "/\/index.php$/", $_SERVER['PHP_SELF'] ))) {


--

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux