Problem displaying an array

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2007
jtrainaldi
 
Posts: n/a
Default Problem displaying an array

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,

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:36 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0