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

  • Home
  • SEARCH
  • 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 8118751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:35:40+00:00 2026-06-06T04:35:40+00:00

I got the follow error: verzend mail naar t met attachment: e verzend mail

  • 0

I got the follow error:

verzend mail naar t met attachment: e
verzend mail naar w met attachment: w
verzend mail naar r met attachment: a
verzend mail naar w met attachment: w
verzend mail naar r met attachment: a
verzend mail naar w met attachment: w

Notice: Uninitialized string offset: 0 in /variables.php on line 248

Notice: Uninitialized string offset: 1 in /variables.php on line 248
verzend mail naar met attachment: 

This is my code:

<?php
    $emailString = 'test@user.nl;www.test.nl^email1@live.nl;www.test2.nl^email3@live.nl;www.test3.nl^';

    $user = explode("^", $emailString); // urls 
    foreach($user as $a_user) {

        $user2 = explode(";", $a_user); // emails
        $a_mailing = array();

        foreach ($user2 as $a_user) {
            $a_mailing[$a_user[0]][] = $a_user[1];
        }   

       foreach($a_mailing as $key => $a_values) {
            foreach($a_values as $value) {
                echo 'verzend mail naar ' . $key . ' met attachment: ' . $value . '<br />';
            }
        }
    }
?>

Can anyone help me??

  • 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-06T04:35:41+00:00Added an answer on June 6, 2026 at 4:35 am

    The issue is that $a_user in the first loop is a string. For example.. in the first iteration the $a_user variable contains this: “test@user.nl;www.test.nl”;

    From what I can see, I believe you are just trying to use the email address as a key and the url as a value so you dont need to use a second loop for that. You can replace:

    foreach ($user2 as $a_user) {
        $a_mailing[$a_user[0]][] = $a_user[1];
    } 
    

    with:

    $a_mailing[$user2[0]][] = $user2[1];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got an undeclared identifier error from the follow code, but i have clearly
Follow up to this question about GNU make : I've got a directory, flac
I just got out of a small project and I've tried to follow a
so i want to follow the mvc conventions but haven't really got the hang
I've got an array of strings that looks like this: [noindex,nofollow] or [index, follow,
I got a string array and values are as follows sNames[0] = Root |
I got the error Use of unassigned local variable 'dictionary' despite I assigned the
This might be a little hard to follow. I've got a function inside an
Here's a follow-up question to Get name of property as a string . Given
I got the following error message while compiling, but I'm sure I have the

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.