On Mar 1, 2004, at 9:58 AM, Jough P wrote:
Greetings all, I'm getting "Notice: Undefined offset" regarding this line of code while inside a for loop:
if($this->inputs[$i] == "user")
I assume the 'offset' that is undefined is $i. But $i is defined is the for statement above it.
Here's the while function:
function draw()
{
echo "<FORM METHOD=\"$this->method\" ACTION=\"$this->action\">\n";
if (count($this->inputs) > 0)
{
for($i=0; $i <= count($this->inputs); $i++)
{
if($this->inputs[$i] == "user")
NexForm::drawUserInputs();
if($this->inputs[$i] == "ctc")
NexForm::drawCtcInputs();
}
}
?><INPUT TYPE=SUBMIT NAME="<? echo $this->btnsubmit ?>" VALUE="<? echo $this->btnsubmitval ?>"><?
echo "</FORM>\n";
}
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php