In C the last character of a string is always ‘\0’ Is it same for PHP as well? If not, then what’s the last character of a string in PHP?
Share
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.
… is one way to do it.
Another way, is simply using PHP function
str_split()(which creates an array of the individual characters of the string (unless you pass it the second argument$split_lengthof a different length than the default)):… etc.
Edit:
As an addendum to your comments to your question; use
fgetcsv()for parsing csv files.