<?php
$a = array( array("chamado_codigo"=>5,"representante_id"=>1), array("chamado_codigo"=>6,"representante_id"=>2) );
$i=0;
foreach($a as $valor) {
$i++;
}
?>
PD9waHAKCiAgICAkYSA9IGFycmF5KCBhcnJheSgiY2hhbWFkb19jb2RpZ28iPT41LCJyZXByZXNlbnRhbnRlX2lkIj0+MSksIGFycmF5KCJjaGFtYWRvX2NvZGlnbyI9PjYsInJlcHJlc2VudGFudGVfaWQiPT4yKSApOwogICAgJGIgPSBhcnJheSggYXJyYXkoInZhbG9yIj0+IlIkIDAsNDUiKSwgYXJyYXkoInZhbG9yIj0+IlIkIDAsNTAiKSApOwoKICAgICRpPTA7CiAgICAkbm92b0FycmF5ID0gYXJyYXkoKTsKICAgIGZvcmVhY2goJGEgYXMgJHZhbG9yKSB7CgkJJG5vdm9BcnJheVtdID0gYXJyYXlfbWVyZ2UoJHZhbG9yLCAkYlskaV0pOwogICAgICAgICRpKys7CiAgICB9CgogICAgcHJpbnRfcigkbm92b0FycmF5KTsKPz4K