robinmglsk/data-merge-php

Personalize your strings

Installs: 190

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/robinmglsk/data-merge-php

1.0.1 2019-12-06 15:45 UTC

This package is auto-updated.

Last update: 2025-11-12 00:18:40 UTC


README

Great for giving you users an easy way to personalize there mails / text messages with tags. More features then str_ireplace.

Usages

Tag options

  • {{ tag }} - default tag
  • {{ ucwords(tag) }} - Change first character of every word to uppercase
  • {{ ucfirst(tag) }} - Change first character of string to uppercase
  • {{ strtolower(tag) }} - Convert string to lowercase
  • {{ strtoupper(tag) }} - Convert string to uppercase
  • {{ date( tag, format )}} - Convert timestamp to string, for format you can use http://php.net/manual/en/function.date.php

You can use || inside your tag to define a default value. Example: {{ tag || client }} If the value of tag is empty client wil be used.

Examples

Check out our exampels in the example folder.