Browsing articles tagged: Tips

Permalink to WordPress Tips: Excluding Pages/Posts From Searches

WordPress Tips: Excluding Pages/Posts From Searches

On 02.07.2010 by Paul Robinson | 4 comments

Sometimes you just don’t want certain pages, or posts to appear when a user searches your WordPress blog. Here is a quick & easy tip to rid your search results of those pesky posts/pages, plus an extra tip to remove pages completely.

Permalink to PHP Tip #6: str_replace Is Faster

PHP Tip #6: str_replace Is Faster

On 05.26.2009 by Paul Robinson | 1 comment

This is probably a very well known tip, but for those new to PHP it’s handy. When needing to replace something try & use str_replace instead of preg_replace. Always remember that REGEX is costly & should only be used when it is really needed. If you need to do a case insensitive replace then use [...]

Permalink to PHP Tip #3: The Ternary Operator

PHP Tip #3: The Ternary Operator

On 03.14.2009 by Paul Robinson | 2 comments

This is probably one of my favorite PHP features. It can be a little complicated to get used to at first, but it really saves a lot of time & can be extremely useful.

Permalink to PHP Tip #2: Is_Numeric() Is A Very Useful Thing

PHP Tip #2: Is_Numeric() Is A Very Useful Thing

On 03.13.2009 by Paul Robinson | 4 comments

The second in my series of PHP tips is to do with the extremely handy is_numeric(). When allowing user input it’s extremely important to check the input for attacks. The most common piece of information handed to MySQL is an ID, but novice coders can get confused with how to check the input. The main [...]

Permalink to PHP Tip #1: Formating Array & Object Output When Debugging

PHP Tip #1: Formating Array & Object Output When Debugging

On 03.09.2009 by Paul Robinson | 2 comments

This is the first in a series of posts I’m doing on small tips which help when coding with PHP. The first is a one most devs probably know, but novice or new coders may not know and probably should.