Tag: PHP

Post Pic

Using MySQL To Search For Any Word In Any Order

A limitation with searches using MySQL is that when using LIKE to find the words queried it will only find them if they are together in the same order they were written. Here is how to change that so the words are found in any order.

Post Pic

Connecting To Twitter API Using PHP

Showing your Twitter timeline, or even just your most recent status update, is becoming increasingly popular. Doing it on a WordPress blog is simple with plugins, but what if you want to do it on a non-WordPress website? Here’s how.

Post Pic

Creating A Wikipedia Style Search

So you want to create an intelligent search for your website? By intelligent you are, of course, talking about the way Wikipedia sends you to the correct page should an exact match be found. Well you’re in luck, here is an easy way to do it using PHP & MySQLi.

Post Pic

Using cURL With PHP To Fetch A Webpage

With APIs such as Twitter’s becoming more & more popular connecting to a webservice or webpage in a script is now a common request. As such here is how to fetch a webpage via PHP using cURL.

Post Pic

Kohana Designers Tip: Twitter API

Ok so I personally am not much of a designer, to be frankly honest I’m rubbish at it. So when it comes to designing things I turn to Lisa Marie of lisa-marieart.com, mainly because she is my sister, but also because she’s an amazing designer. Anyway she is currently redesigning her website using Kohana & [...]

Post Pic

Kohana And AJAX (Sitting In A Tree)

This is my first in a line of tutorials based on Kohana PHP Framework. This first tutorial is based on how to use Kohana in conjunction with AJAX. Some people have had some trouble with it, as did I when I first used it, so here are the basics.

Post Pic

Variable Scope: A Beginners Guide (PHP & Javascript)

Variable scope is something that comes in handy in most coding languages, in my experience though it is invaluble in Javascript. If you are sitting thinking, ‘but what the hell is it’, then let me explain. Variable scope is a set of rules applied to a variable telling it where & it what context it [...]

Post Pic

PHP Tip #6: str_replace Is Faster

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 [...]

Post Pic

PHP Tip #5: header

Another useful command that all PHP coders should know is the header() function. You can use it to send a HTTP header to the server.

Post Pic

PHP Tip #4: Type Casting

I kinda touched on Type Casting in the second PHP tip about is_numeric(). The basic idea is that you can force a variable’s value to another type. For instance, changing a string to an integer.

Page 1 of 3123»

£88.06 / £1200

Help me buy an iMac so I can develop iPhone/iPod apps. If you would like to donate, or you want to learn more about why I started this fund click here.

We're Talking About...