I'm trying to pull out specific records from a table (eg the 3rd to the last record) and display them. I've spent most of this morning playing with code but I'm still trying to grasp the basics, particularly around pulling out records and putting them into arrays.
I've included code of the sort of thing I was trying to achieve but any suggestions or help would be appreciated.
$packageSQL = @("SELECT packageID, packageName, packageValue FROM tblPackage");
while ($rsPackage = mysql_fetch_array($packageSQL) ) {
$idArray = $rsPackage['packageID'];
$nameArray = $rsPackage['packageName'];
$valueArray = $rsPackage['packageValue'];
}
for ($i=3; $i<= sizeof($idArray); $i++)
{
echo $idArray[$i]. "<br />";
echo $nameArray[$i]. "<br />";
echo $valueArray[$i]. "<br />";
}
Many thanks, Des