Tagged: php

PHP5 Static Keywords 0

PHP5 Static Keywords

PHP5 offers a static methods and static member variables.A special kind of method that can be called without instantiating a class.Static methods don’t depend on the properties of a particular instance of a class...

PHP5 Interfaces 0

PHP5 Interfaces

An interface simply lists (function prototype) the methods a class must implement. However, in PHP a class can implement multiple interfaces and these interfaces can also be used in type hinting. An INTERFACE is...

PHP5 Abstracts 0

PHP5 Abstracts

Abstract classes and methods are introduced in PHP 5. The concept behind the abstract class is that we need to extend this class by its descendant class(es). If a class contains abstract method then...

PHP Final Keywords 0

PHP Final Keywords

Final Keywords prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended. Final keyword helps us to put...

How to Replace Newline with Space Using PHP 0

How to Replace Newline with Space Using PHP

Sometimes you need to replace newline to space or any other format (i.e:- \r\n). This is done by copying and pasting the content. To resolve this problem I use the given blow code. $remove_character...

Calculate week in PHP 0

Calculate week in PHP

Use this script to calculate a week in PHP <?php $date = mktime(0, 0, 0, 01,27, 2011); $week = (int)date(‘W’, $date); ?>