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

Home » Imported messages » comp.lang.php » searching an array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: searching an array [message #183743 is a reply to message #183740] Mon, 18 November 2013 04:57 Go to previous messageGo to previous message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma:
Member
On Sun, 17 Nov 2013 22:37:44 -0500, richard <noreply(at)example(dot)com>
wrote:

> I am now attempting to set up a display using a simple table.
> row 1 is headers.
> row 2 is for the main track title.
> row 3 is for the flipside.
>
> http://mroldies.net/list/decade60.html
>
> Many times the flipside was also charted.
> So I need to know what the corresponding number is for the flipside in
> order to show that information.
>
> from the "manual" I am using this:
>
> $flip=$six0[$track][1];
>
> $flip2=array_search($flip,$six0);
>
> if ($flip2=null){echo "does not exist";}
>
> How do I properly code it so that when a match is not found?
> Neither null or "" seems to work.
>
> $six0=array(
> 1 => array("The Theme From \"A Summer Place\"","Go-Go-Po-Go","Columbia
> 4-41490","Percy Faith","Max Steiner","21","1","1/11/1960","1"),
> 2 => array("Are You Lonesome To-Night?","I Gotta Know*","RCA Victor
> 47-7810","Elvis Presley","Roy Turk Lou Handman","16","1","11/14/1960","2"),
> 3 => array("It's Now Or Never","A Mess Of Blues*","RCA Victor
> 47-7777","Elvis Presley","Aaron Schroeder Wally
> Gold","20","1","7/18/1960","3")
> )

Ask yourself: What single type of error have I made repeatedly and has
been pointed out here over and over and over and over?

If you can answer that then you are equal to the task, although that
is not the same as correcting it.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: file size
Next Topic: array search part 2
Goto Forum:
  

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

Current Time: Wed Nov 27 05:39:11 GMT 2024

Total time taken to generate the page: 0.03620 seconds