FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » array search part 2
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: solved [message #183787 is a reply to message #183785] Tue, 19 November 2013 14:48 Go to previous messageGo to previous message
tony is currently offline  tony
Messages: 19
Registered: December 2010
Karma:
Junior Member
In article <0(dot)7dbacdb97db2593ac9fc(dot)20131119135002GMT(dot)87bo1gpkl1(dot)fsf(at)bsb(dot)me(dot)uk>,
Ben Bacarisse <ben(dot)usenet(at)bsb(dot)me(dot)uk> wrote:
> richard <noreply(at)example(dot)com> writes:
>
>> <?php
>>
>> $track=$_GET['item'];
>>
>>
>> $asong=$six0[$track][0];
>> $flip=$six0[$track][1];
>>
>> $max=count($six0);
>>
>> $match=0;
>>
>> for ($item=0;$item<=$max;$item++){
>> if ($flip==$six0[$item]['0'])
>> {if ($six0[$item][2]=$six0[$track][2])
>
> There's no need to assign something to itself just to test it.

It's not being assigned to itself. The destination is indexed by $item
and the source is indexed by $track.

Cheers
Tony
--
Tony Mountifield
Work: tony(at)softins(dot)co(dot)uk - http://www.softins.co.uk
Play: tony(at)mountifield(dot)org - http://tony.mountifield.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: searching an array
Next Topic: Perform maths based on a number in a text file
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 00:47:03 GMT 2024

Total time taken to generate the page: 0.04525 seconds