croakingtoad Posted April 3, 2006 Share Posted April 3, 2006 So here's my code that I have (that isn't working)--[code] $count = 2; for ($i = 0; $i <= $count; $i++) { foreach($_arr[$i] as $key => $row) { if($key != 0) { echo "Value to insert- $_arr[$i][3]<br />"; mysql_query ("INSERT INTO $sql_table (mls) VALUES ('$_arr[$i][3]') "); } #endof if } #endof foreach } #endof for[/code]You can actually see part of the array I'm working with here-- [a href=\"http://roanokehousehunter.com/cron/csv2arrayManual.php\" target=\"_blank\"]http://roanokehousehunter.com/cron/csv2arrayManual.php[/a]I think my looping is off, but basically when I run this script I'm getting this as the result--[code]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3]Value to insert- Array[3][/code]And it's inserting "Array[3]" into the database fields. If you look at array[1][3] the value is "601815", that and corresponding is what I'm going for here...what am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.