You are here: Finite $_POST loops infinitely - help! « PHP Programming Language « IT news, forums, messages
Finite $_POST loops infinitely - help!

Posted by comp.lang.php on 08/21/06 22:40

I have no idea why this is happening and I need someone to explain this
to me at the simplest level absolutely possible (pretend I'm a 10-year
old and explain it that way, please!)

This class method:

PHP Code:
/**
* Perform an array scan
*
* @access private
* @param array $array
* @see vname
*/
function &array_scan(&$array) {
if (is_array($array) && @sizeof($array) > 0) {
print_r("sizeof(" . vname($array) . ") = " . sizeof($array) .
"<P>");
$index = 1;
foreach ($array as $key => $val) {
print_r("index = $index<P>"); $index++;
$this->setData($val);
print_r("key = $key and val = $val and this->data =
$this->data and array name = " . vname($array) . "<P>");
$this->scan($key, vname($array));
$array[$key] = $this->getData();
}
}
}


Constantly produces the following results:

Quote:
sizeof(_POST) = 5

index = 1

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 2

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 3

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 4

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 5

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 6

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 7

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 8

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 9

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

index = 10

key = username and val = phillip and this->data = phillip and array
name = _POST

this->data = phillip

....// and so on and so on.. as high as 200,000 at times and still
doesn't quit!!



Why is this happening, I honestly can't see why.

Thanx
Phil

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация