I don't get an error. I'm using this in a sql query. When I run the query the data from the variables is not present in the table. When I use the same query with strings in the array, the information is added to the table. That's why I think there is a problem with the way I use variables in the array.
Something else is going on, like maybe it's not reaching the lines that set the variable. Try doing a print_r or var_dump of $item right after you set it. If it's getting set, try moving the var_dump down the script some until you get to the sql. If you don't get anywhere post the relevant section of the script so we can look at it.