Hi,
I am a beginner at PHP and i’m trying to use current() and end() functions to display a slightly different layout for the last row of the array. I have been trying to find the solution but couldn’t. Here is the first part of the code:
while(list($underpageid, $underpageauthor, $underpagetitle, $underpagetarget, $underpagestatus, $underpagelevel_x, $underpagelevel_xx, $underpagelevel_xxx, $underpagepath) = mysql_fetch_array($underpageresult, MYSQL_NUM))
{
/* Here I would like to be able to say: If it’s not the last row, echo “blabla”, if it’s the last row, echo “BLABLA”, but it doesn’t work: */
if (current($underpageresult) != end($underpageresult)) {
echo “blabla”;
}
elseif (current($underpageresult) == end($underpageresult)) {
echo “BLABLA”;
}
}
All I get from this is that I am not passing an array.
Thank you very much for your help.