Tag Archives: array

Imploding an Associative Array

In the previous article, I said that implode() only works on simple, numeric arrays, but what if you want to do something similar with an associative array of keys and …

Tags: , , , | Posted under MODX, MODX | Leave a comment

Using implode() to Convert an Array to a String

If you’ve read the last two articles, you know how the explode() function works. The implode() function does just the opposite. It converts an array to a delimiter-separated string. In …

Tags: , , , | Posted under MODX, MODX | Leave a comment

Using explode() to create arrays

Say you have a snippet that needs a simple array and want to send the elements of the array in the snippet tag. The PHP explode() function is custom-made for …

Tags: , , | Posted under MODX, MODX | Leave a comment