In the IF block you are assigning scalar values to $_SESSION['ems_id'] and $_SESSION['ems_emt'], so those array elements are not arrays themselves, but you then try to assign array elements to them in the last two lines. I'm not real sure what you want to do, but I'm guessing this might be closer:
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
A small side remark.
What to you wish to use the $ix for?
If you are going to use it to assign values to the next index in the array, this would be wrong. Arrays starts at 0, but count will return the number of indexes including the first at 0.
If you have an array with 2 indexes, they will be placed at 0 and 1. Count() will return 2, and your $ix will contain 4 instead of 3 which is the next index, because you assign $ix with +1.
In the IF block you are assigning scalar values to $_SESSION['ems_id'] and $_SESSION['ems_emt'], so those array elements are not arrays themselves, but you then try to assign array elements to them in the last two lines. I'm not real sure what you want to do, but I'm guessing this might be closer:
Bookmarks