Tag Archives: associative

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 explode() to Create Associative Arrays

In the previous article, we saw how to use explode() to create a simple array of names. In this one, we’ll send an extra bit of information along with each …

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

Replacing Strings with an Associative Array (PHP)

In the previous article, we looked at using str_replace with two separate arrays, one for the strings to replace, and one for the replacements. This isn’t always the most convenient …

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