Tag Archives: php

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

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

Updating a legacy PHP site to work with PHP 5.4

Recently I was notified by a webhost that a project I had completed in 2013 was incompatible with their pending upgrade to php 5.4 on July 23, 2015. They listed 1 …

Tags: , , | Posted under Errors, Server Security | Leave a comment