I want to remove the first character of a string like so,
$a1 = "A10";
$a2 = substr($a1,1,strlen($startsem1)-1);
but I want to retrieve that removed “A” later on. Is there a way I can “cut” or “copy” that removed “A” to some variable?
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.
Did you mean:
PHP supports array like syntax for strings too so
$a1[0](zero based index as in array) extracts first letter from string.