Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the opposite of explode function?

Tags:

This is how I explode a sentence into an array of words:

$words = explode(" ", $sentence);

How do you do the opposite? (take an array such as $words with single numeric keys into a variable storing a string such as $sentence with spaces between words)

like image 928
lisovaccaro Avatar asked Dec 19 '11 06:12

lisovaccaro


People also ask

What is opposite of explode in Autocad?

Hi, the command you are looking for is "join", it will connect all the lines you select. To execute this command you need to turn all the lines you want to join into polylines if they aren't already. 1) select line 2) type "pedit" 3) press enter.

What are implode and explode functions?

The explode() function breaks a string into an array, but the implode function returns a string from the elements of an array.

What is implode function?

The implode() function returns a string from the elements of an array. Note: The implode() function accept its parameters in either order. However, for consistency with explode(), you should use the documented order of arguments. Note: The separator parameter of implode() is optional.

What does the explode () function return?

The explode() function splits a string based on a string delimiter, i.e. it splits the string wherever the delimiter character occurs. This functions returns an array containing the strings formed by splitting the original string.


1 Answers

http://php.net/manual/en/function.implode.php

$sentence = implode(' ',$words); 
like image 165
Timur Avatar answered Oct 06 '22 13:10

Timur