I have a website connected to a web service and I need to recognize the characters received in my codes.
For instance, I receive a message like this :
$str = "Hello Europe";
or :
$str = "4 times !";
or :
$str = "452231";
or :
$str= "*Majid SH";
or ...
I want my code to understand the character which my message started by, and do the a function correspond to a special character.
For example, if it was started by a string, do function num1
, or if it was started by '.' [dot], do function num2
.
Thank you for helping me.