AngularJS – Directives

AngularJS directives are used to extend HTML. These are special attributes starting with ng- prefix. We’re going to discuss following directives − ng-app − This directive starts an AngularJS Application. ng-init − This directive initializes application data. ng-model − This directive defines the model that is variable to be used in AngularJS. ng-repeat − This… Read More »

Start learning AngularJS

In this chapter we will discuss about how to set up AngularJS library to be used in web application development. We will also briefly study the directory structure and its contents. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as a JavaScript file, and can be added to… Read More »

Using variables in CSS style sheets

One advantage of CSS is that your styles can be kept in a separate file from the pages that use them. This is simply a text file that ends with the .css suffix such as style.css. The suffix tells the server to treat the contents of the file as CSS. Unfortunately, the CSS standard doesn’t… Read More »

Interfaces Abstract Classes and the Adapter Pattern

PHP 5 made significant improvements on the Object Orientated programming model of PHP 4 bringing it more in line with languages such as Visual Basic .NET and Java. The improved object model in PHP 5 makes developing applications using OOP much easier and gives you the programmer, greater flexibility. The first features new to PHP… Read More »

Remove a Query String Key=>Value using PHP

I needed to find a PHP function that would allow me to remove keys (and their values) easily and reliably. /* the function */ function remove_querystring_var($url, $key) {   $url = preg_replace(‘/(.*)(?|&)’ . $key . ‘=[^&]+?(&)(.*)/i’, ‘$1$2$4’, $url . ‘&’);   $url = substr($url, 0, -1);   return $url; }

The PHP Class with Dynamic Functions

class Record {     /* record information will be held in here */   private $info;     /* constructor */   function Record($record_array) {     $this->info = $record_array;   }     /* dynamic function server */   function __call($method,$arguments) {     $meth = $this->from_camel_case(substr($method,3,strlen($method)-3));     return array_key_exists($meth,$this->info) ? $this->info[$meth] : false;  … Read More »

Php Writing to csv file

In this code am taking in a variable from a dynamic form($search). The variable is 10 random unique numbers. It was put into the form from a text/csv file. In this I need to write each line of the text/csv file into an array except the $search number, delete the contents of the file &… Read More »

PHP Class Tutorial: Working with Methods

Class properties allow your objects to store data and class methods allow your objects to perform tasks. What are Class Methods Methods are special functions declared within a class. As you might expect, a method declaration resembles a function declaration. The function keyword precedes a method name, followed by an optional list of argument variables… Read More »

PHP Exception Handling

What is an Exception With PHP 5 came a new object oriented way of dealing with errors. Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception. This is what normally happens when an exception is triggered: The current… Read More »

Introduction to PHP5 OOPS Features

PHP5 has made a lot of improvements as regarding OOPS is concerned. Although it has not been up to the mark with the likes of Java, .NET and C++; but when compared to PHP4, PHP5 has made significant improvements. In this post, I propose to cover the following topics: About PHP5 Future of PHP New… Read More »