Home Contact

PHP: str_replace

<Keithblog />


All instances of $search are replaced with $replace in $subject.

// Will print to screen: "Why is the sky blue?". 
echo str_replace("red","blue","Why is the sky red?")

Related posts on keithgreer.uk

PHP: glob

Magento Code: Check an import directory for new product CSVs and process using a Magmi profile

PHP: header

Magento Code: Include currency switcher in the header or footer with Foundation mark-up

Magento Code: Add a drop down attribute and display it on the product page in custom HTML

Magento header.phtml basic user account and basket code

Magento Issue: Unable to sort configurable product attribute drop down options

WordPress Code: Completely disable comments using functions.php

How to use PHP to submit a cURL request with HTTP Post data