Re: Accessing variables
| From: | Andrei Zmievski | Date: | Fri, 30 Jun 2000 18:13:17 +0000 |
| Subject: | Re: Accessing variables | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4084@lists.php.net to get a copy of this message | ||
On Fri, 30 Jun 2000, Hans Lellelid wrote:
> > $i ++;
> > } while(!ereg("</V", $httpd_conf[$i]));
> > $i = $i++;
> > echo("#Removed $httpd_conf[$i]<BR>");
>
> It seems that on the 3rd line of this block, you should put "$i = ++$i;".
> The assigment $i=$i++ is going to prevent the value of $i from incrementing
> (since the increment is done *after* the assign).
That assignment doesn't make any sense. Just do $i++ if you want to
increment $i.
-Andrei
* Unix is user friendly, it is just chooses its users selectively. *