Add drupal_implode()

Created on 21 June 2009, over 15 years ago
Updated 29 January 2024, 10 months ago
function drupal_implode($glue1, $glue2, array $pieces) {
  $last = array_pop($pieces);

  return implode($glue1, $pieces) . $glue2 . $last;
}

This code allows for proper summaries in interface texts:

Little red riding hood carried a basket with bread, cookies and milk.

rather than

Little red riding hood carried a basket with bread, cookies, milk.
✨ Feature request
Status

Closed: won't fix

Version

9.5

Component
BaseΒ  β†’

Last updated 4 minutes ago

Created by

πŸ‡¬πŸ‡§United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    With 10+ years of inactivity wonder if this is a desired feature or something that could be better suited for contrib?

  • Status changed to Closed: won't fix 10 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Given there has been no other interest in 14 years I think we can say no to this one.

Production build 0.71.5 2024