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
solved (was: array search part 2) [message #183780 is a reply to message #183752] Tue, 19 November 2013 02:45 Go to previous messageGo to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
<?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])
{$match=$item;}}
}

http://mroldies.net/list/decade60.html

The for loop searches through the array for a match first based on name.
Then further matches by label number.
[0]=charted name
[1]=flipside
[2]=label
[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 08:39:37 GMT 2024

Total time taken to generate the page: 0.03957 seconds