Hi All,
I will admit I am not a programmer.. I just like to dabble in the black-arts of php now and again... 🙂 Trying to code a basic script, having a few problems..
I have a MySQL table which I am trying to drag values you from... I have a series of fields in which range from P1H1 through to P4H18... Ie, P1H1, P1H2 etc.. I have struck a problem - with using variables within arrays..
I am using the following:
for ($rows = 1; $rows <= $myrow[NumPlayers]; $rows++) {
echo "<td width = \"100\" BGCOLOR = \"#759CF3\"><b><center>_ " . $myrow["Player$rows"] . "</center></td>";
}
echo "</tr>";
for ($HoleNum = 1; $HoleNum <= $myrow[NumHolesPlayed]; $HoleNum++) {
printf ("<tr><td>$HoleNum< /td><td>$course[Par]< /td><td>$course[Distance]<_ /td>");
echo "<td>" . $myrow["P$rows"."H$HoleNum"] . "</td></tr>";
$course = mysql_fetch_array($rslt);
}
The Problem is I am trying to use two variables as array pointers in order to extract the values - I am not sure of the syntax or if it is even possible... Suggestions greatly appreciated.
Cheers,
Kezza.