How to create an array of objects??


$array = array();
$data = new stdClass();

$data->id = ‘id’;
$data->name = ‘name’;
$data->color = ‘color’;

$array[] = $data;
$array[] = $data;
$array[] = $data;




class myc
var $i='dude';
function pr(){echo 'hi '.$this->i.'<br>';}
$test = new myc;
$testtwo = new myc;
$testtwo->i = ‘senor’;

$arr = array($test, $testtwo);


foreach($arr AS $cl) { $cl->pr(); }


CodeIgniter Installation Instructions

CodeIgniter is installed in four steps:

  1. Unzip the package.
  2. Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.
  3. Open the application/config/config.php file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key.
  4. If you intend to use a database, open the application/config/database.php file with a text editor and set your database settings.

If you wish to increase security by hiding the location of your CodeIgniter files you can rename the system and application folders to something more private. If you do rename them, you must open your main index.php file and set the $system_folder and $application_folder variables at the top of the file with the new name you’ve chosen.

For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible via a browser. By default, .htaccess files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn’t abide by the .htaccess.

After moving them, open your main index.php file and set the $system_folder and $application_folder variables, preferably with a full path, e.g. ‘/www/MyUser/system’.

PHP Developer Responsibilities and Duties

Some of the roles and responsibilities of a web developer are as follows:

  1. Identify bugs and fix them, trouble shoot and solve any related problems.
  2. Help other members and provide the necessary assistance in the up gradation and maintenance of websites.
  3. Create, design, test and apply web-based applications
  4. Create the right code structures to resolve specific tasks.
  5. Develop, program, test and debug all web based applications.
  6. Prepare and coordinate intranet web updates and intranet website changes.
  7. Participating in a team-oriented environment to develop complex web-based applications


Title: Senior PHP Developer:
  1. To interpret written business requirements and technical specification documents.
  2. To perform coding to written technical specifications.
  3. To perform code maintenance and testing.
  4. To fix application issues and code irregularities.
  5. To give technical feedback to the Application Architect.
  6. Correspond with and report to Application Architect.
  7. Building and maintenance of core PHP based applications.
  8. To develop web page infrastructure and application related to pages with more advanced graphics and features.
  9. To design and develop relational database systems and their web interfaces.
  10. Responsible for integrating MySQL database with the PHP applications.


PHP Developer skills set and job responsibilities

PHP is perhaps the most popular web development language at the time. At least 20 million domains use PHP. It is a language that is used on major sites such as Facebook and Wikipedia as well as in some of the world’s biggest open source projects like Drupal and WordPress. The person who is writing this language is a PHP developer. A PHP Developer writes, tests, troubleshoots, and maintains the source code for web pages and computer graphics programs. A PHP Developer uses and develops code that are followed by computers to execute different tasks.

Maintained code of a PHP developer must be well-documented, reusable and able to be modified to fulfill changing needs with passage of time. PHP Programmers are free to work for companies on salary basis or independently on contracts basis.

Job Responsibilities of a PHP Developer

A PHP developer is responsible to look out page layout, design and the entire coding of the developing website according to the PHP format. The PHP developer will be responsible for graphical and technological aspects of a website. The developer is responsible to update existing features of the website.

They are responsible to develop program codes by referring to existing websites and software packages. They are also responsible to upload a site on server. Other responsibilities of PHP Developers include:

  • Updating the site by adding new features.
  • Identifying technical errors that may occur due to bugs in the code.
  • Preliminary testing the site to make sure that it is functioning properly.
  • Deliver appropriate leadership and maintain the page layout and show characteristics for the client websites.
  • Build up contents according to client requirement.
  • Have appropriate contacts with other designers and programmers for a competent outcome.
  • Do proper documentation of the program and add technical requirements in the code.
  • Accurate testing of the built up code at a variety of stages to identify bugs.
  • They work in a team with a number of individuals like database administrators, designers, HTML & CSS programmers and project manager.
  • Write reusable code preferably using classes and libraries
  • They design architecture of the program.
  • Programming databases specially mySql
  • Testing and debugging new programs
  • Establishing projects from scratch or working on accessible projects
  • Staying aware of security issues in PHP
  • Developing front-end and back-end applications
  • Helping team members to solve different problems

PHP Programmers may simply have to adjust or customize essential, accessible code for an application. There programmers with hands on experience on latest open source programs like, Mambo, Drupal, Joomla, WordPress, Magento are in great demand. On the other hand, a PHP Developers may also be called to build up and write new code for different programs. Some employers also look for PHP Developers who are skillful in other technologies such as SSH, FTP and SQL. A PHP developer will be in great demand if he is experienced in diverse programming languages.

Education Requirements for PHP Developers

Some applicants may require PHP certification that can be obtained through online certification examination. Several institutes in large metropolitan areas are also providing professional PHP developer trainings. But a PHP Developer with bachelor’s degree in Computer Sciences, BSCS, BS IT, BS SW or MCS is more valuable in the market.

What is HTML5?

HTML5 is the latest standard for HTML.

HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2.

It was specially designed to deliver rich content without the need for additional plugins. The current version delivers everything from animation to graphics, music to movies, and can also be used to build complicated web applications.

HTML5 is also cross-platform. It is designed to work whether you are using a PC, or a Tablet, a Smartphone, or a Smart TV.

Some rules for HTML5 were established:

  • New features should be based on HTML, CSS, DOM, and JavaScript
  • The need for external plugins (like Flash) should be reduced
  • Error handling should be easier than in previous versions
  • Scripting has to be replaced by more markup
  • HTML5 should be device-independent
  • The development process should be visible to the public


A Minimum HTML5 Document

Below is a simple HTML5 document, with the minimum of required tags:

<!DOCTYPE html>
<meta charset=”UTF-8″>
<title>Title of the document</title>
Content of the document……



HTML5 – New Features

Some of the most interesting new features in HTML5 are:

  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search


XML stands for eXtensible Markup Language.

XML is designed to transport and store data.

XML is important to know, and very easy to learn.

PHP SimpleXML Examples


<?xml version=”1.0″ encoding=”UTF-8″?>
<body>Don’t forget me this weekend!</body>



output: SimpleXMLElement Object ( [to] => Tove [from] => Jani [heading] => Reminder [body] => Don’t forget me this weekend! )


Output the element’s name and data for each child node:

echo $xml->getName() . “<br>”;

foreach($xml->children() as $child)
echo $child->getName() . “: ” . $child . “<br>”;

output:   note
to: Tove
from: Jani
heading: Reminder
body: Don’t forget me this weekend!


data write to XML file using php file


$xml = new DOMDocument();
$xml_album = $xml->createElement(“Album”);
$xml_track = $xml->createElement(“Track”);
$xml_album->appendChild( $xml_track );
$xml->appendChild( $xml_album );