Examples of...
Popular examples
Top Examples
Examples of Explode PHP
Explode PHP
The explode() function split a string by string into an array.
array explode ( string $delimiter , string $string <, int $limit > )
delimiter: The boundary string.
string: The input string.
limit: Optional. Specifies the maximum number of array elements to return
Example of explode function:
<?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.
)
Is this example useful?
To share this example, copy and paste this code into your website, blog or forum:
array explode ( string $delimiter , string $string <, int $limit > )
delimiter: The boundary string.
string: The input string.
limit: Optional. Specifies the maximum number of array elements to return
Example of explode function:
<?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.
)
Is this example useful?
To share this example, copy and paste this code into your website, blog or forum:
Comments
To leave a comment, you must register for free a> or if you are already registered log in.
Has not written any comments yet.
Has not written any comments yet.
Related examples
Htmlspecialchars PHP Posted on 2011-01-15 12:38:54
The htmlspecialchars() function converts special characters to HTML entities
string htmlspecialchars ( string $string )
The translations ...Htmlspecialchars_decode PHP Posted on 2011-01-15 12:35:47
The htmlspecialchars_decode() function convert special HTML entities back to characters
string htmlspecialchars_decode ( string $string )...Htmlentities PHP Posted on 2011-01-15 12:33:50
The htmlentities() function convert all applicable characters to HTML entities
string htmlentities ( string $string )
This function is id...Html_entity_decode PHP Posted on 2011-01-15 12:30:04
The html_entity_decode() function converts all HTML entities to their applicable characters.
The html_entity_decode() function is the opposi...Echo PHP Posted on 2011-01-15 12:22:55
The echo() function outputs one or more strings.
void echo ( string $arg1 )
arg1: The parameter to output.
Examples of echo function:
...