Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #11858

Re: array search part 2

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: array search part 2
Date Tue, 19 Nov 2013 09:27:59 +0100
Lines 39
Message-ID <528B210F.10106@arnowelzel.de> (permalink)
References <93xuovoqvo59.1wcgm8i5gn2hb$.dlg@40tude.net> <181120131505521953%timstreater@greenbee.net> <1effhia2fnbeo$.1ts7of1q9m0f7.dlg@40tude.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Trace individual.net WJtQ/xcSckIsg2HUCSqSvwW0RlPgzd8mhHXwcVW2h+wTfuQ7CP
Cancel-Lock sha1:Qa5rJLBrHxETmfMJAYs2CfeY14M=
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
In-Reply-To <1effhia2fnbeo$.1ts7of1q9m0f7.dlg@40tude.net>
X-Enigmail-Version 1.6
Xref csiph.com comp.lang.php:11858

Show key headers only | View raw


richard, 2013-11-18 17:06:

> On Mon, 18 Nov 2013 15:05:52 +0000, Tim Streater wrote:
> 
>> In article <93xuovoqvo59.1wcgm8i5gn2hb$.dlg@40tude.net>, richard
>> <noreply@example.com> wrote:
>>
>>> I am attempting to search the array for matching entries.
>>> All matches, not just the first.
>>> While the code works fine, the result is not what I want.
>>> $btrack should return the value of six0[$track][0].
>>> Instead, the result shows the array key number.
>>> Even if I change the [0] to [1].
>>> Why?
>>
>> For the 17 billionth time, you thick dope, you have used = instead of ==
>>
[...]
>>> $btrack=$six0[$arow][0];
>>> if ($btrack=$track){echo $btrack;}
>>> $arow++;
>>> }
>>>
>>>
>>> ?>
> 
> You thicker DOPE! IT MAKES NO FRICKIN DIFFERENCE!
> And the examples I have seen at php.net all use a single =.

The examples DO NOT MATTER!

Read THIS:
<http://us3.php.net/manual/en/language.operators.php>


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

array search part 2 richard <noreply@example.com> - 2013-11-18 09:10 -0500
  Re: array search part 2 Christoph Michael Becker <cmbecker69@arcor.de> - 2013-11-18 15:32 +0100
    Re: array search part 2 richard <noreply@example.com> - 2013-11-18 09:59 -0500
  Re: array search part 2 richard <noreply@example.com> - 2013-11-18 09:31 -0500
  Re: array search part 2 Tim Streater <timstreater@greenbee.net> - 2013-11-18 15:05 +0000
    Re: array search part 2 richard <noreply@example.com> - 2013-11-18 11:06 -0500
      Re: array search part 2 Christoph Michael Becker <cmbecker69@arcor.de> - 2013-11-18 17:17 +0100
      Re: array search part 2 "Peter H. Coffin" <hellsop@ninehells.com> - 2013-11-18 11:08 -0600
      Re: array search part 2 Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-11-19 03:11 +0000
      Re: array search part 2 Arno Welzel <usenet@arnowelzel.de> - 2013-11-19 09:27 +0100
    Re: array search part 2 Jerry Stuckle <jstucklex@attglobal.net> - 2013-11-18 13:08 -0500
  Re: array search part 2 richard <noreply@example.com> - 2013-11-18 11:11 -0500
    Re: array search part 2 "J.O. Aho" <user@example.net> - 2013-11-18 19:10 +0100
      Re: array search part 2 Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-18 18:28 +0000
        Re: array search part 2 "J.O. Aho" <user@example.net> - 2013-11-18 20:03 +0100
  solved  (was: array search part 2) richard <noreply@example.com> - 2013-11-18 21:45 -0500
    Re: solved Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-19 13:50 +0000
      Re: solved Scott Johnson <noonehome@chalupasworld.com> - 2013-11-19 06:16 -0800
        Re: solved Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-19 16:29 +0000
          Re: solved Scott Johnson <noonehome@chalupasworld.com> - 2013-11-19 10:57 -0800
      Re: solved tony@mountifield.org (Tony Mountifield) - 2013-11-19 14:48 +0000
        Re: solved Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-11-19 16:12 +0100
        Re: solved Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-19 16:25 +0000
      Re: solved richard <noreply@example.com> - 2013-11-19 11:51 -0500
        Re: solved Christoph Michael Becker <cmbecker69@arcor.de> - 2013-11-19 18:31 +0100
        Re: solved Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-19 18:15 +0000
    Re: solved Arno Welzel <usenet@arnowelzel.de> - 2013-11-19 17:43 +0100
      Re: solved richard <noreply@example.com> - 2013-11-19 14:41 -0500
        Re: solved "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2013-11-19 19:52 +0000
        Re: solved Arno Welzel <usenet@arnowelzel.de> - 2013-11-20 16:02 +0100

csiph-web