Tag: php

How to randomise the order of paragraphs with PHP

How to randomise the order of paragraphs with PHP

One part of launching new websites which offer pretty much the same products and services is rewriting content so that it doesn’t appear to be a direct copy of exiting websites. To help me rewrite articles, I find it helps me to randomise the order of key selling points so I can focus on rewriting them rather […]

Automatically list images in a directory with PHP

Automatically list images in a directory with PHP

Sometimes I want to lob some images into a directory to be viewed online for review. There is a way of doing this using glob which is a function in PHP that searches for path names matching patterns according to specified rules. <?php echo(‘<style type=”text/css”> img { margin:3px; padding: 7px; border: 1px solid #aaa; background: […]

Adding canonical URL’s to OpenCart

Adding canonical URL’s to OpenCart

I wanted to address duplicate content on a project by adding canonical URL’s because the product page (e.g.: mydomain.com/category/category.html) shares content on some category pages of the same name (e.g.: mydomain.com/category). OpenCart does not allow canonical URL’s by default and although you can buy modules to address this I decided to code my own solution. To […]