Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: solved Date: Tue, 19 Nov 2013 17:43:25 +0100 Lines: 48 Message-ID: <528B952D.9090500@arnowelzel.de> References: <93xuovoqvo59.1wcgm8i5gn2hb$.dlg@40tude.net> <1939vbqgxpb1.1ed40enyqnzu1$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net swiA0JdGzhxLSZYuI+NdNwwSl2UX7tG+qspBLU41p+kUw44pXC Cancel-Lock: sha1:tiIDV8HTsVm1DEIi/bXEjWw7GGo= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: <1939vbqgxpb1.1ed40enyqnzu1$.dlg@40tude.net> Xref: csiph.com comp.lang.php:11865 Am 19.11.2013 03:45, schrieb richard: > > $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;}} > } PLEASE format your code properly! for($item=0; $item <= $max; $item++) { if($flip == $six0[$item]['0']) { if($six0[$item][2] = $six0[$track][2]) { $match = $item; } } } And why this? if($six0[$item][2] = $six0[$track][2]) Please note: "=" is NOT the same as "=="! If you want to COMPARE $six0[$item][2] and $six0[$track][2] you MUST write: if($six0[$item][2] == $six0[$track][2]) -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de