PHP related - how to explot a string with commas and store into two different variables?

PHP related - how to explot a string with commas and store into two different variables?

Hi, I have a string and is like this '[tubelist 123456,54321,56789,98765]'. I would like to extract the first value after the tubelist, and store '123456' into a variable. Next i would like to store the rest of the values without the first one '54321,56789,98765' into another variable.

The end result I want to achieve is:

$variable1 = 123456 $variable2 = 54321,56789,98765

thanks

View Answers









Related Tutorials/Questions & Answers:
string related
php two dimensional array
Advertisements
php parse string as php
Replace String in PHP - PHP
string validation in php - PHP
PHP String Function
Merging Two Arrays Of Different Lengths
MySql PHP Connection String - PHP
java fundamental question related to string
combine two arrays in php
php parse string for url
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
php parse string to time
php parse string to float
PHP String Operator
php parse string as int
validate jtextfield in two different class use keylistener
List out different arguments in PHP header function?
PHP Variables and Strings
PHP String to Array
help to write a program for biology to know if two person are related or not
Display Different Elements from two ArrayLists in Java
string related question
PHP Comparison Objects
convert date into String like 9-10-2012 into nine october two thousand twelve
PHP References Explained
Declaring string array
PHP Regular Expression
string
PHP search data with different format
To get the String between two strings
php parse string into array
php parse ini string
php parse string to date
define string variable in php
JAVA what is different between static block and public static void main(String a[]) method
PHP Associative Array
PHP Getting Started With PHP Tutorial
store
store
php comma delimited string to array - PHP
php comma delimited string to array - PHP
php
String concatenation process example
remove comma from string php
remove comma from string php
php
PHP and MySQL BETWEEN dates with different years
Strings in PHP
PHP Variable Global

Ads