php - A for loop not doing as expected -


i running loop , attempting enter data array.

when run print_r of array, it's if loop running once when should running multiple times!

for($i=0; $i<count($count); $i++){         $currentfield = $array[$i];         $test = "".$field."[".$i."]";         $this->_postdata[$test] = $currentfield;         $this->_currentitems[$i] = $test;     }      print_r($this->_currentitems);     die(); 

if echo $count before, says 3 (for example) still when print array, has 1 value! ideas?

thanks.

try

for($i=0; $i<$count; $i++) 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -