Showing posts with label php. Show all posts
Showing posts with label php. Show all posts
Saturday, 10 May 2014
Wednesday, 2 April 2014
Friday, 28 March 2014
Tuesday, 25 March 2014
Thursday, 19 December 2013
PHP foreach loop tutorial
The foreach construct provides an easy way to
iterate over arrays and it used to loop through each key/value pair in an array.
Wednesday, 18 December 2013
Use of define() function in PHP
Use of define() function is to set a constant. It has three parameters: first is name of the constant, second is value for the constant and third parameter for constant name should be case-insensitive.
Monday, 16 December 2013
String functions in php
There are many string functions, below PHP script illustrates six php string functions: 1) strlen 2) strpos 3) chr 4) explode 5) implode 6) str_replace
Friday, 13 December 2013
Constructor in PHP - OOP
Below PHP script illustrates constructor in PHP. To create constructor in PHP __construct keyword is used. In our example, we pass one string parameter(in our case "Jignesh") while creating object.
Thursday, 12 December 2013
Hello World Program Using OOP in PHP
Following Script illustrates simple Object Oriented Programming in PHP. Script contains one class named "HelloWorld". Class contains variable named "world" and method/function named "getHtml()" to return message "Hello, World!". To call "getHtml()" method first we have to create object (in our example $greetings) of HelloWorld class. And using that object we are calling getHtml() method ($greetings->getHtml()).
Subscribe to:
Posts
(
Atom
)