Get Answers!
   

rohinibudda

How To Split A String

Thursday, 18th December 2008

I.e if the str= welcome to java i want to split it in to welcom, to , java
 





Diesel
$string=welcome to java
$splitstring=explode(" ",$string);
echo $splitsting[0]; //this prints "welcome"
echo $splitsting[1]; //this prints "to"
echo $splitsting[2]; //this prints "java"
Friday, 19th December 2008
Votes:

More Programming:
» What Are The Differences Between Using Single Quotes And Double Quotes In PHP?
» How Do I Remove White Space From The Left And Right Sides Of My Variables In PHP?
» Is There A JavaScript Lowercase Function?
» Smap Schema
» I Need Source Code For Wireless Networking Project Can U Help Me
» How Do I Unlink A File From Flash As3??
» How Can I Show The Difference Between Two Dates Using PHP?
» Where Is My Php.ini File?


Leave a Comment on "How To Split A String"
You must be logged in to post a comment.


Link to This Question!