Hi All,
I am trying to get a page-label on top of each page I load. The coding is pasted below.
Strangely enough, the if - else which I use is ignored. When I show the $sublabels[pageID] and the $labels[pageID] I can see they are different (eg 3 vss 4), and still the code in the " if ($SubLabels[PageID] = $labels[PageID]) { } " section is executed.
It searches for a page with a specified subject, and page (nr) of 0 (That is the first in the series of nested pages, with the main label)
Is there an error here I am missing?
Thanks for your help!
Jelle
$labelQuery = " Select * from bioindex where bioindex.PageId = $id";
$LabelResult = mysql_query($labelQuery);
//echo $labelQuery;
while ($labels =@ mysql_fetch_array($LabelResult))
{
$Query = " Select * from bioindex where bioindex.Subject = $labels[Subject] and bioindex.page = 0";
$QueryResults = mysql_query($Query);
while ( $SubLabels =@ mysql_fetch_Array($QueryResults))
{
if ($SubLabels[PageID] = $labels[PageID]) {
$label = "$labels[topic]";
} else {
$label = "$labels[topic]>$SubLabels[topic]";
}
}
}