This is a discussion on Problem displaying an array within the PHP General forums, part of the PHP Programming Forums category; I am having a problem and I am not sure what to do. I am new to PHP and was ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am having a problem and I am not sure what to do. I am new to PHP
and was wondering if someone can help me on my problem I know it might be something simple but I am stuck CODE: while (!$rs->EOF) { $eventName = $rs->Fields("Subject"); $sTime = $rs->Fields("Start"); $sTimeStamp = strtotime($sTime); $eTime = $rs->Fields("End"); $eTimeStamp = strtotime($eTime); $roomNum = $rs->Fields("Location"); array_push($eventArray, $eventName); echo $eventArray[$rowNum]."<br />"; $rowNum += 1; $rs->MoveNext(); } echo "<br /><br />"; echo $eventArray[2]."<br />"; When I try to display a value in one of the array fields it only works inside the while loop. When I use the same line of code it doesn't seem to work. Thank you for your help, |