|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Array Reference
I want to compare dates in sequential records (in mysql format YYYY-MM-DD) extracted into an array. I have a loop to iterate through a set of records. In this loop, how can I refer to the previous record in the loop?
As in: for ($i=0; $i <$num_results; i++) { $row = mysql_fetch_assoc($result); if ($row('thisDate') != the previous record's date) { do something } } |
|
#2
|
||||
|
||||
|
RE: Array Reference
This is related to PEAR how? This belongs in PHP Coding.
place the previous records date in a holding variable. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > Array Reference |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|