Re: Check the URL

From: Date: Mon, 21 Apr 2003 17:18:06 +0000
Subject: Re: Check the URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144673@lists.php.net to get a copy of this message
if (strstr($URL,$MyArray[$i][0])) echo "this is in the array."; } Use stristr for case insensitive searchs. checkout php.net for details for strstr and stristr. "Christian Ista" <mailing-list@istasofts.com> wrote in message news:20030421154324.33331.qmail@pb1.pair.com... > Hello, > > I have an array > > var $MyArray= array ( > 0 => array (0 => "AA" , 1 => '0' , 2 => > '1111' ), > 1 => array (0 => "BB" , 1 => '0' , 2 => > '2222'), > 2 => array (0 => "CC" , 1 => '0' , 2 => > '3333'), > 3 => array (0 => "DD" , 1 => '0' , 2 => > '4444' ), > 4 => array (0 => "EE" , 1 => '0' , 2 => > '5555' ), > 5 => array (0 => "FF" , 1 => '0' , 2 => > '6666' ), > 6 => array (0 => "GG" , 1 => '0' , 2 => > '7777' ) > ); > > I loop the array and I'd like to know if the content of MyArray[$i][0] is > present in the URL > > Could you tell me how to do that ? > > Thanks, > >

« previous php.general (#144673) next »