yeah I know but what I mean basically then is there a way to access that information outside of a while loop so I can have the sql in the begining of the page and then access the data porion of it later on outside the while loop.
after reading the article on arrays here I found this statement
$ArrayInventory = array();
$ArrayInventory["arrayNovels"] = array("Andromeda Strain", "Rainbow Six", "Lord of the Rings");
$ArrayInventory["arrayKidsBooks"] = array("Jack and Jill", "Clifford the Big Red Dog", "How Stuff Works");
$ArrayInventory["arrayMagazines"] = array("Motorcycle World", "Guitar One", "Car and Driver");
foreach($ArrayInventory as $ArrName => $ArrElem) {
echo "<br>".$ArrName."<br><br>";
foreach($ArrElem as $Element) {
echo $Element."<br>";
}
}
what I need is to be able to acces that information later instead of in the for while loop.
here is where I am at let me know if I am on the right path and where to go from here to get at that data because I am stuck
$result = mysql_query("SELECT * FROM holeblue");
WHILE ($row = mysql_fetch_array($result)){
$i= 0;
$name = "course$i";
$arraycourse[$name] = array("$row[0]", "$row[1]", "$row[2]","$row[3]", "$row[4]");
$i++;
}
now later on I want to be able to simply pull the piece of data within the html output?
does this make any sense?