The for each loop pulls corresponding code_id's from a database and puts them in an array like this. $i is just the index for the arrays. It is an integer.
$code[0] = G corresponds to $code_id[0] = 14
$code[1] = PG corresponds to $code_id[1] = 18
$code[2] = R corresponds to $code_id[2] = 54
etc...
After it creates the $code_id array however I have to index it like this to get the correct values.
print("{$code_id[0][0]}<br>");<-- will print 14
print("{$code_id[1][0]}<br>");<-- will print 18
print("{$code_id[2][0]}<br>");<-- will print 54
etc..
It works, I just didn't want the extra[0]. Brandons solution will work, only I was hoping I didn't miss something so simple. DUH on my part!