How to split a string into individual characters using PHP?

January 17, 2011 at 1:29 pm Leave a comment

In one of our php project, we had to split a string into individual characters. I thought there should be some built-in function for doing this. But I couldn’t find the appropriate build-in php function.

Currently we are using below code snippet for doing this split..

for($i=0;$i< strlen($inputstring);$i++){
 $letterarray[]=$inputstring[$i];
 }

You can let me know thro’ the comments if you know any suitable function for doing this task.

Advertisements

Entry filed under: Software.

PHP Quiz Questions and Answers Use Incognito window in chrome for doing private browsing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Tweets

January 2011
M T W T F S S
« Dec   Jul »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Blog Stats

  • 26,673 hits

QualityPoint on Twitter

Error: Twitter did not respond. Please wait a few minutes and refresh this page.


%d bloggers like this: