<?php
$tipo='a,,c,d';
$metragem='15,18,,44';
$metragem = explode(",",$metragem);
$arr = array($tipo,$metragem);
foreach($res as $v) {
if($v[0] != "" && $v[1] != "") {
echo PHP_EOL . $v[0] . " = " . $v[1];
}
}
PD9waHAKCiR0aXBvPSdhLCxjLGQnOwokbWV0cmFnZW09JzE1LDE4LCw0NCc7CgokdGlwbyA9IGV4cGxvZGUoIiwiLCR0aXBvKTsKJG1ldHJhZ2VtID0gZXhwbG9kZSgiLCIsJG1ldHJhZ2VtKTsKCiRhcnIgPSBhcnJheSgkdGlwbywkbWV0cmFnZW0pOwoKYXJyYXlfdW5zaGlmdCgkYXJyLCBudWxsKTsKJHJlcyA9IGNhbGxfdXNlcl9mdW5jX2FycmF5KCJhcnJheV9tYXAiLCAkYXJyKTsKCmZvcmVhY2goJHJlcyBhcyAkdikgewoKICAgIGlmKCR2WzBdICE9ICIiICYmICR2WzFdICE9ICIiKSB7CgogICAgICAgIGVjaG8gUEhQX0VPTCAuICR2WzBdIC4gIiA9ICIgLiAkdlsxXTsKICAgIH0KfQ==