I have the string 1. Welcome.
I’d like to split the string into 2 strings: 1 & Welcome.
How would I use substr PHP function to achieve this?
Many thanks for any pointers
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
For this particular case, the most appropriate function would be
explode:You can combine this with the
listconstruct for extra convenience:Finally, it’s a good idea to specify the third parameter of
explode(limit to how many tokens are generated) in case the title contains dots: