Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8278753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:06:52+00:00 2026-06-08T09:06:52+00:00

I need to mail my customers, and for this I have a csv file

  • 0

I need to mail my customers, and for this I have a csv file containing the customers data including emails in CSV file.

How can I use PHP to read all email addresses, put them into array, or insert them into text file (just a format I can use)

The CSV looks like this: (sample record)

"Date","Ref #","Time","Customer","Country","Email","Product","Product ID","Contract","Contract ID","Payment Type","Frequency","Referrer","Qty","Sale type","Adds","Total","Price","Plimus Commission","Affiliate Commssion (%)","Affiliate Commssion ($)","Tracking Id","CUSTOM1","CUSTOM2","CUSTOM3","CUSTOM4","CUSTOM5","Subscription ID","Target Balance","PayPal Comm.(main contracts)","PayPal Transaction ID","Original PayPal Transaction ID","PayPal email address"
"06/06/2008","19796287","04:06:29"," Mehmet Özekinci","Turkey","mhmtozek@gmail.com","Website Templates Pack","190830","xxxxxxxxxxx","1941602","PAYPAL","Once","xxxxxxxxxxxx","1","CHARGE","0","25","25","0","n/a","n/a"," "," "," "," "," "," "," ","xxxxx Account"," "," "," ","k_anafor56@hotmail.com"

The file contains more than 3000+ records (CSV file). How can I find/get all emails ..@.. in PHP?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:06:54+00:00Added an answer on June 8, 2026 at 9:06 am

    Just loop through the CSV and grab the appropriate field. You use fgetcsv() to do this:

    $emails = array();
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $emails[] = $data[5];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send mail with PHP and I use mail function like this:
I need to send multiple emails at a time, can any one have example?
I want to use Database mail for my application and this means I need
have downloaded page by webbrowser and need to get mail address. But it is
I need to write php code to identify common e-mail errors, like inbox full
I need that my applicatiob will be able to get mail... this is c#
I'm working with django, i need send a mail to many emails, i want
I have a form that customers fill in with personal data and also makes
What I need to do is some data between 2 databases. The source can
I have to estimate the time we need to upgrade one of our customers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.