php and arrays need help with for loop?

evachick156

New member
When i print_r($_POST) it looks like this:
teach[0]-> t1; teach[1]->t2; teach[2]->t3

Im trying to echo it thru a for loop like this:
$teach = $_POST[$rows['id'] . '_teach[]'];
for($i = 0; $i<=$teach.length; $i++)
{
echo $teach[$i];
}

Why wont this work?
 
Back
Top