note 68212 deleted from function.mysql-result by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:58:40 +0000 |
| Subject: | note 68212 deleted from function.mysql-result by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197261@lists.php.net to get a copy of this message | ||
Note Submitter: gack at bar dot foo
----
if you want to do something based on the fact that the data is the same in the next row, then
looking ahead is easy with this.
<?php
$i=0;
$rows=mysql_num_rows($result);
while($i < $rows) {
$x = mysql_result($result, $i, 0);
if ($x = mysql_result($result, $i+1, 0)) {
echo "It's the same thing!";
}
}
?>