Skip to content

Instantly share code, notes, and snippets.

@rafaelmaeuer
Created October 13, 2023 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelmaeuer/20c2f984dd105fe0c2148c251116d89b to your computer and use it in GitHub Desktop.
Save rafaelmaeuer/20c2f984dd105fe0c2148c251116d89b to your computer and use it in GitHub Desktop.
<?php
$langs = array("PHP", "JavaScript", "Python", "C++", "Ruby");
$newLangsSpace = implode(" ", $langs);
$newLangsComma = implode(", ", $langs);
$newLangsHyphen = implode("-", $langs);
// Since we are printing a string, we can use echo to display the output in the browser
echo $newLangsSpace."<br>"."<br>";
echo $newLangsComma."<br>"."<br>";
echo $newLangsHyphen ."<br>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment