1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to split a string in php twice.... Help

Discussion in 'Programming' started by Jangga, Mar 11, 2017.

Tags:
  1. Jangga

    Jangga Junior Member

    Joined:
    Aug 8, 2016
    Messages:
    119
    Likes Received:
    4
    Gender:
    Male
    Occupation:
    Freelancer: A reWriter
    Location:
    Africa
    Hello guys, I would love to split a string(an email) such that I would be able to get the 'gmail' or 'yahoo' or 'outlook' out of it

    What I got now:
    Code:
    $geta=explode('.', [email protected]);
    $getb=explode('@', $geta["0"]);
    echo $get["1"]:
    
    But it ain't working
     
  2. cheva

    cheva Regular Member

    Joined:
    Aug 22, 2009
    Messages:
    348
    Likes Received:
    403
    Location:
    Aiur
  3. Jangga

    Jangga Junior Member

    Joined:
    Aug 8, 2016
    Messages:
    119
    Likes Received:
    4
    Gender:
    Male
    Occupation:
    Freelancer: A reWriter
    Location:
    Africa
    Thanks alot man
     
  4. cheva

    cheva Regular Member

    Joined:
    Aug 22, 2009
    Messages:
    348
    Likes Received:
    403
    Location:
    Aiur
    no worries dude
     
    • Thanks Thanks x 1