I often need to replace the contents of a tag using php with another variable. This is made easy with the preg_replace() function and a nifty regular expression.
$content = '
Some content to replace
';
echo $content;
//output:
Some content to replace
//replace content using preg_replace and regex:
$content = preg_replace('/
]*>.*?<\/div>/i', '
New Content>', $content);
echo $content;
// new output:
//
WordPress 3.0’s menu system already rocks, but check out what you can do with this GoDaddy-like menu system with custom “walkers” containing descriptions.