-
-
Save parzibyte/902551eef8cfd67fdb5a9e63218630f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Convertir arreglo a cadena en PHP (unir arreglo) | |
https://parzibyte.me/blog | |
*/ | |
$arreglo = array( | |
"Son of a preacher Man", | |
"Crocodile Rock", | |
"Who made who", | |
"Play the game", | |
"Blue Jean", | |
); | |
$pegamento = ","; // Una coma, aunque podríamos dejar la cadena vacía | |
$cadena = implode($arreglo, $pegamento); | |
var_dump($cadena); | |
/* | |
Salida: | |
string(63) "Son of a preacher Man,Crocodile Rock,Who made who,Play the game" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment