Archive for the ‘PHP’ Category

Display Images in Cake PHP

Posted: January 19, 2010 in Cake PHP

Today I face a problem as a beginner of CakePHP …How can I display image button with link in Cake. I wanted to use images as my buttons to edit and delete records and  navigate the admin pages. 1. Have to use HTML Helpers Image and Link, and we shall combine this 2. The CakePHP [...]

Real-World OOP With PHP and MySQL

Posted: November 3, 2009 in PHP

Setting up the skeleton of our class is fairly simple once we figure out exactly what we need. First we need to make sure that we can do our basic MySQL functions. In order to do this, we need the following functions: Select Insert Delete Update Connect Disconnect Those seem pretty basic, but I’m sure [...]

I am asked “How do I convert an array or object into a string” very frequently so I thought I would put a quick little tutorial together explaining the various different methods. Converting an array OR object into a string(BEST METHOD) We are going to use the functions serialize and unserialize. These functions are very [...]

Regular Expressions in PHP

Posted: November 3, 2009 in PHP

Regular expressions are a language of their own. When you learn a new programming language, they’re this little sub-language that makes no sense at first glance. Many times you have to read another tutorial, article, or book just to understand the “simple” pattern described. Today, we’ll review eight regular expressions that you should know for [...]

OOPS in PHP

Posted: November 3, 2009 in OOPS in PHP, PHP

Object Oriented Programming in PHP This article introduces Object Oriented Programming (OOP) in PHP. Luis shows you how to code less and better by using some OOP concepts and PHP tricks.Object Oriented Programming in any language is the use of objects to represent functional parts of an application and real life entities. For example you [...]

An Introduction to PHP Classes

Posted: November 3, 2009 in OOPS in PHP, PHP

About Object-Oriented Programming Many programming languages are object-oriented. However, the method of defining an object varies from language to language. Some examples of object-oriented languages are: Java JavaScript C++ and finally, PHP Basic Class Programming in PHP In PHP, an object is defined as this: class myObject { //variables and methods go here } Methods [...]

Why PHP?

Posted: August 6, 2009 in PHP

Reply to the query raised to me by many people: The great thing about PHP is that you can do ANYTHING — really, anything, that can be done on the web by a website. You can do it very, very quickly, and usually with support from existing libraries. And it has been proven to scale [...]

We have seen on how to declare class and now we have to define the attributes or the data member that will hold the data within the class. This tutorial will guide you to create attributes for the class. What are Attributes for Class? In OOPS attributes hold the data required for the class to [...]

In Object Oriented Programming Classes is the main entity and all other features of OOP work around the Classes. In this tutorial we will be discussing on declaring class in PHP5. Also covered on how to instantiate the class object. Declaring Class in PHP5: In PHP5 you create a new class using “class” keyword. The [...]

This article will guide you through the PARENT keyword used in OOPS implementation in PHP5. Parent Keyword allows to forcefully call the parent method and not the child method. This is useful when you are implementing Polymorphism in PHP 5. This keyword is also very useful if you want the derived class to call the [...]