User Tools

Site Tools


uphp:functions:implode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
uphp:functions:implode [2017/03/18 19:32]
jeff
uphp:functions:implode [2017/05/11 23:09]
jeff
Line 1: Line 1:
 ======implode====== ======implode======
 +
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Turn an array into a string+<html>Turn an <b><span style="color:green">array<span style="color:black"></b> into a <b><span style="color:green">string<span style="color:black"></b></html>
  
 ====Description==== ====Description====
-<well size="sm"><html><span style="font-size:125%;color:green;">string + 
-<span style="color:black;"></html>[[implode]] +<well size="sm"><html> 
-<html>+<span style="font-size:125%;color:green">string 
-<span style="color:green;">array +<span style="color:black">implode ( 
-<span style="color:blue;">$array<span style="color:black;">, +<span style="color:green">array 
-<span style="color:green;">string +<span style="color:blue">$array<span style="color:black">, 
-<span style="color:blue;">delimiter +<span style="color:green">string 
-<span style="color:black;">)+<span style="color:blue">$delimiter 
 +<span style="color:black">)
 </html></well> </html></well>
-Turn an array into a string with the delimiter separating each element+ 
 +<html>Turn an <b><span style="color:green">array<span style="color:black"></b> into a <b><span style="color:green">string<span style="color:black"></b> with the delimiter separating each element</html>
  
 ====Parameters==== ====Parameters====
-<html><span style="color:blue;"><b>array</b><span style="color:black;"></html>:  Array to be turned into a string 
  
-<html><span style="color:blue;"><b>delimiter</b><span style="color:black;"></html>:  Character to use for separating each array element put into the string+<html><b><span style="color:blue">$array<span style="color:black"></b>:  <b><span style="color:green">Array<span style="color:black"></b> to be turned into a <b><span style="color:green">string<span style="color:black"></b></html>
  
-====Return Value==== +<html><b><span style="color:blue">$delimiter<span style="color:black"></b>:  Character to use for separating each array element put into the <b><span style="color:green">string<span style="color:black"></b></html> 
-String containing concatenated elements+ 
 +====Return Values==== 
 + 
 +<html><b><span style="color:green">String<span style="color:black"></b> containing concatenated elements</html>
  
 ====Example==== ====Example====
 +
 <code php> <code php>
 <? <?
Line 39: Line 45:
  
 ====See Also==== ====See Also====
-[[explode()]] - Turn a string into an array 
  
-[[array()]] - Create an array with values+[[explode()]] - <html>Turn a <b><span style="color:green">string<span style="color:black"></b> into an <b><span style="color:green">array<span style="color:black"></b></html> 
 + 
 +[[array()]] - <html>Create an <b><span style="color:green">array<span style="color:black"></b>, with optional values</html>
  
 [[uphp:variables|uPHP Variable Types and Limits]] [[uphp:variables|uPHP Variable Types and Limits]]
  
 ====Additional Information==== ====Additional Information====
-The mainline PHP function ''implode()'' can accept its parameters in either order, but uPHP requires that the array comes first followed by the delimiter.+ 
 +The mainline PHP function ''implode()'' can accept its parameters in either order, but uPHP requires that the <html><b><span style="color:green">array<span style="color:black"></b></html> comes first followed by the delimiter.
  
 Wattmon uPHP's parameter order is easier to remember and more consistent:  The delimiter parameter comes last in both [[explode()]] and [[implode()]]. Wattmon uPHP's parameter order is easier to remember and more consistent:  The delimiter parameter comes last in both [[explode()]] and [[implode()]].
  
  
uphp/functions/implode.txt · Last modified: 2021/09/13 05:57 (external edit)