#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    6
    Rep Power
    0

    Doubt regarding substitution


    Hi,

    I have a flash movie that calls a PHP script to send an email. The problem is that sometimes the variable comes like this: "Email:joe@domain.com"

    How can I check and chop the "Email:" part of the variable? And how do I remove any trailing and ending spaces after?

    Kind regards,

    JKepler
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,865
    Rep Power
    368
    subtsr - search for it
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    6
    Rep Power
    0
    Hi,

    Not even close....but I solved the questions.

    Rhanks anyway.

    Kind regards,

    JKepler
  6. #4
  7. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,910
    Rep Power
    1045
    Originally Posted by jkepler
    Not even close....but I solved the questions.
    Will you write down the solution? Or is it so brilliant that you must keep it secret?
  8. #5
  9. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,690
    Rep Power
    6351
    substring and trim would have solved this, as would str_replace, preg_replace, explode, split, and a number of other solutions. Please explain the question better next time and share your solutions with the community. Remember, if everyone kept the solutions to themselves, nobody would get any help at all.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo