Split Functions.php 1

Split Functions.php

Here is what the above code is Doing:
1. We create a string variable called $pizza and assign it a value of "piece1 piece2 piece3 piece4 piece5 piece6".
2. We create a variable called $pieces and call the explode() function on $pizza. The explode() function breaks up a string into an array. The first argument of the explode() function is the separator (in this case, a space), and the second argument is the string to be exploded (in this case, $pizza).
3. We echo the first element of the $pieces array (piece1).
4. We echo the second element of the $pieces array (piece2).

Similar Posts