kepler Posted September 24, 2013 Share Posted September 24, 2013 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:[email protected]"How can I check and chop the "Email:" part of the variable? And how do I remove any trailing and ending spaces after? And - sorry for asking so many questions - do I exit the script if the result variable is null?Kind regards, Kepler Link to comment https://forums.phpfreaks.com/topic/282413-substitution-and-checking-expression/ Share on other sites More sharing options...
Ch0cu3r Posted September 24, 2013 Share Posted September 24, 2013 How can I check and chop the "Email:" part of the variable? There are many ways to modify text with PHP. Some functions you can use str_replace or substr or using regualr expressions with preg_replace And how do I remove any trailing and ending spaces after? You can use trim And - sorry for asking so many questions - do I exit the script if the result variable is null? Ask as many questions as you like Link to comment https://forums.phpfreaks.com/topic/282413-substitution-and-checking-expression/#findComment-1451072 Share on other sites More sharing options...
kepler Posted September 24, 2013 Author Share Posted September 24, 2013 Hi, Thank you very much. Problem solved ! Kind regards, Kepler Link to comment https://forums.phpfreaks.com/topic/282413-substitution-and-checking-expression/#findComment-1451080 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.