public function getBriefInfoMessages()
    {
        $array = imap_headers($this->imap);
        $newArray = [];
        foreach ($array as $key => $string) {
            $newArray[] = ['id'=>$key+1, 'info' => $string];
        };
        return $newArray;
    }
public function getBriefInfoMessages()
    {
        $array = imap_headers($this->imap);
        $newArray = [];
        foreach ($array as $key => $string) {
            $newArray[] = ['id'=>$key+1, 'info' => $string];
        };
        return $newArray;
    }
public function getBriefInfoMessages ( ) { $ array = imap_headers ( $ this -> imap ) ; $ newArray = [ ] ; foreach ( $ array as $ key => $ string ) { $ newArray [ ] = [ 'id' => $ key + 1 , 'info' => $ string ] ; } ; return $ newArray ; }
Returns an array of brief information about each message in the current mailbox.

Structure return array arrays
$array = [
[ 'id'=>4, 'info'=>'brief info' ]
[ 'id'=>5, 'info'=>'brief info' ]
]

@return array
Returns an array of brief information about each message in the current mailbox .