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:
PHP Code:
if(isset($_SESSION['ems_id']) == NULL) {
echo "empty";
$_SESSION['ems_id'] = array();
$_SESSION['ems_amt'] = array()
}
$ix = count($_SESSION['ems_id']);
$ix++;
$_SESSION['ems_id'][5] = strval($rowEms['hs_id']);
$_SESSION['ems_amt'][5] = strval($rowBuy2['hs_ems']);