explode php - string to array in php
Posted by Raj
explode php-string to array in php
explode: converts a string into an array.
Syntax
explode(separator,string)
Example:string to array in php
<?php
$str = "A,B,C,D";
print_r (explode(",",$str));
?>
OUTPUT:
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
)
explode: converts a string into an array.
Syntax
explode(separator,string)
Example:string to array in php
<?php
$str = "A,B,C,D";
print_r (explode(",",$str));
?>
OUTPUT:
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
)
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
explode,
explode php,
PHP explode function,
php string array,
string to array php
.You can leave a response, or trackback from your own site.