It's easy:
foreach ($users as $index => $code)
{
echo $users[$index].', '.$types[$index];
}
If it's possible, that each array contains different number of elements (or better you just simply don't know, how many items each array contains), you should also check, if particular element exists in second array:
foreach ($users as $index => $code)
{
echo $users[$index].', '.(isset($types[$index]) ? $types[$index] : 'doesn\'t exist');
}
You can also use for example for loop:
// array indexes start from 0, if it they're not set explicitly to something else
for ($index = 0; $index < count($users); $index++)
{
echo $users[$index].', '.(isset($types[$index]) ? $types[$index] : 'doesn\'t exist');
}
If you wouldn't check, if particular element exists in second array, PHP would produce an error of type notice, which tells you that you're accessing undefine offset:
PHP Notice: Undefined offset: X in script.php on line Y
Where X is an index (key), which exists in first array, but doesn't exists in second array.
Note: you should always develop with enabled displaying of all types of errors, even notices, and always check if particular index exists in an array, if you're not sure (e.g. array comes from user input, database etc.).