H I O X INDIA
FREE PHP Topics
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
Español  Français  中文  Deutsch 
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

PHP Topics
Introduction
Common Header
Random Number
Type
Form Variables
Date and Time
PHP Mysql Functions
File Handling
Error Handling
DB Size
PHP Mail
String Tokens
Running PHP from JS
Array To JS
Array to PHP
Encryption
Ask Your Doubts
More about PHP
Feedback




String Tokens / Splitting string


Topic

How can I split the string using php?



Explanation



Let us consider we get a value from a post actionone,two,three
i.e: $ss = $_POST['arv'];

Now using the php method explode() we will convert the string in to a array object
explode(seperator,string);
i.e. $tok = explode(',',$ss);

so we have got a string array. Now we print the array using print_r() method. This method prints the array in string format.

print_r($tok);


The result
Array ( [0] => one [1] => two [2] => three )





others


privacypolicy     licence     sitemap
© 2004-2005 hioxindia.com