php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8178 For loop bug
Submitted: 2000-12-08 15:49 UTC Modified: 2000-12-08 15:54 UTC
From: mgrigajtis at rosasonline dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
 [2000-12-08 15:49 UTC] mgrigajtis at rosasonline dot com
It won't let me do this:

for ($i=0; $i<$column_count; $i++)
{
  print "$HTTP_POST_VARS[check$i];
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-08 15:54 UTC] jason@php.net
This is not a bug

for ($i=0; $i<$column_count; $i++)
{
  print "$HTTP_POST_VARS[check$i];
}

bad syntax

use 

for ($i=0; $i<$column_count; $i++)
{
  print $HTTP_POST_VARS[ "check" . $i ];
}

please submit all programming questions to php-general@lists.php.net and not the bug list.

-Jason


 [2000-12-08 15:54 UTC] jmoore@php.net
This is not a support area please read the bugs dos and donts before posting again.

James
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Oct 09 22:00:02 2026 UTC