문제

I don't know if it should be here but, I'm using this

$filepath = 'export/subscriberslist.csv';
        $this->directory->create('export');
        $stream = $this->directory->openFile($filepath, 'w+');
        $stream->lock();

        $header = ['Id', 'Email', 'Grupo'];
        $stream->writeCsv($header);

And with variables with a foreach writing newsletter subscribers emails and group, but some of them don't have an email, so I wanted, in the end of the write, to search for the lines that has no email then delete that lines so they don't pollute the csv with lines with no info at all.

How can I do this?

Thanks for your time, Rui Silva

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top