Re: [PHP] Re: Array Search - Solved

2011-03-26 Thread Ethan Rosenberg
At 01:31 PM 3/25/2011, João Cândido de Souza Neto wrote: It´s a job to array_key_exists function. -- João Cândido de Souza Neto "Ethan Rosenberg" escreveu na mensagem news:0lim00hi3ihny...@mta4.srv.hcvlny.cv.net... > Dear List - > > Here is a code snippet: > > $bla = array("g1" => $r

[PHP] Re: Array Search

2011-03-25 Thread Jo�o C�ndido de Souza Neto
It´s a job to array_key_exists function. -- João Cândido de Souza Neto "Ethan Rosenberg" escreveu na mensagem news:0lim00hi3ihny...@mta4.srv.hcvlny.cv.net... > Dear List - > > Here is a code snippet: > > $bla = array("g1" => $results[7][6], >"h1" => $results[7][7]); >

[PHP] Re: Array Search Not Working?

2010-03-10 Thread clancy_1
On Wed, 10 Mar 2010 09:52:30 -0500, aj...@alumni.iu.edu (Alice Wei) wrote: > >Hi, > > I have two arrays here that I have combined into a new array, as shown here: > >$from = explode("-", $from); >$change = explode("-",$change); >$new_array = array_combine($from,$change); > >I then tried reading i

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
> > I'm still a little foggy on what you're doing, but doing, but does this > help? > > $from = explode("-", $from); > $state_colors = explode("-", $state_colors); > $change = explode("-", $change); > > $old = array_combine($from, $state_colors); > $new = array_combine($from, $change); > > //s

[PHP] Re: Array Search Not Working?

2010-03-10 Thread Shawn McKenzie
Alice Wei wrote: > From: aj...@alumni.iu.edu > To: nos...@mckenzies.net > CC: php-general@lists.php.net > Subject: RE: Array Search Not Working? > Date: Wed, 10 Mar 2010 11:21:26 -0500 I'm still a little foggy on what you're doing, but doing, but does this help? $from = explode("-", $from); $stat

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
From: aj...@alumni.iu.edu To: nos...@mckenzies.net CC: php-general@lists.php.net Subject: RE: Array Search Not Working? Date: Wed, 10 Mar 2010 11:21:26 -0500 > Date: Wed, 10 Mar 2010 10:09:54 -0600 > From: nos...@mckenzies.net > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > Sub

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
> Date: Wed, 10 Mar 2010 10:09:54 -0600 > From: nos...@mckenzies.net > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > Subject: Re: Array Search Not Working? > > Alice Wei wrote: > > Hi, > > > > I have two arrays here that I have combined into a new array, as shown > > here: > > >

[PHP] Re: Array Search Not Working?

2010-03-10 Thread Shawn McKenzie
Alice Wei wrote: > Hi, > > I have two arrays here that I have combined into a new array, as shown here: > > $from = explode("-", $from); > $change = explode("-",$change); > $new_array = array_combine($from,$change); > > I then tried reading it from a file and do string matches, trying to find

[PHP] Re: array search

2005-01-23 Thread Malcolm
Ah so -- array_search only works on values ? That probably accounts for my first day or so, thanks. I've got it now. On Sun, 23 Jan 2005 19:22:32 +0100, M. Sokolewicz <[EMAIL PROTECTED]> wrote: Malcolm wrote: Hello All, I've been trying for days now to make this work. I'm trying to search my

[PHP] Re: array search

2005-01-23 Thread M. Sokolewicz
Malcolm wrote: Hello All, I've been trying for days now to make this work. I'm trying to search my array for a value and return the key. I get the visitor's IP and try this -- this is the latest, I've tried a few functions to echo the name associated with the viz_ip. $viz_ip= $_SERVER['REMOTE_A