View Single Post
  #4 (permalink)  
Old 05-10-2008, 02:08 AM
saravanan saravanan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 181
saravanan is on a distinguished road
Default Re: PHP String Functions With Examples

The explode() function breaks a string into an array.
example:

PHP Code:
<?php
$str 
"Hello world. It's a beautiful day.";
print_r (explode(" ",$str));
?>
output

Array
(
[0] => Hello
[1] => world.
[2] => It's
[3] => a
[4] => beautiful
[5] => day.
)
Reply With Quote