PHP Loops

Table of contentsIntroductionWhileDo whileForFor eachContinueBreakConclusionIntroduction Loops are used in programming to iterate over an item, either for a known or unknown amount of times, until a certain criteria has been reached. You have the choice of writing a single loop and specifying how it ends and writing the same code over and over again to […]

OOP: Writing a class and creating objects

Table of contentsIntroductionExamplesJavaPHPConclusionIntroduction Classes and objects are a key principal of OOP (Object-Oriented Programming). The idea behind OOP is that classes are created to┬árepresent a real world entity; this real world entity could be a tangible object, such as a person or a car, or an intangible object, such as a job position or a […]

Accessing the WordPress JSON API

Table of contentsGitHubIntroductionHow to access an APIAn API classGitHub [gitrepo author=”f13dev” repo=”WordPress-API-PHP-class”] Introduction APIs are a great thing, especially if you want to access data hosted on another website. WordPress, like many other websites with a large public data store offer an API. Accessing data from an API via PHP can be a little daunting […]

Add #HashTag and @UserName Twitter links to plain text

Table of contentsGithubWhat does it doUsage exampleCodeGithub What does it do This short and simple PHP function takes a plain text String as it’s input and returns rich text HTML. If any #HashTags, Twitter @UserNames or URLs are included within the input string then these are converted to clickable links to their Twitter counterpart. Usage […]

WordPress plugin: Twitter profile widget

WP Github Embed, adding release information