Tools, FAQ, Tutorials:
Joining Multiple Strings in PHP
How To Join Multiple Strings into a Single String?
✍: FYIcenter.com
If you multiple strings stored in an array, you can join them together into a single string with a given delimiter by using the implode() function. Here is a PHP script on how to use implode():
<?php $date = array('01', '01', '2006'); $keys = array('php', 'string', 'function'); print("A formated date: ".implode("/",$date)."\n"); print("A keyword list: ".implode(", ",$keys)."\n"); ?>
This script will print:
A formated date: 01/01/2006 A keyword list: php, string, function
2016-10-13, 815👍, 0💬
Popular Posts:
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...
How to build a test service operation to dump everything from the "context.Request" object in the re...
How to access URL template parameters from "context.Request.Matched Parameters"object in Azure API P...
How to see more EPUB 2.0 metadata list with Calibre? You can follow this tutorial to view EPUB 2.0 m...
How To Submit Values without Using a Form in PHP? If you know the values you want to submit, you can...