keyword used to declare a constant is ‘const’. Constants differ from normal variables in that you don’t use the ‘$’ symbol to declare or use them. The value must be a constant expression, and should not be a variable, a class member, result of a mathematical operation or a function call.
Example #1:
<?php
class MyClass
{
const constant = ‘constant value’;
function showConstant() {
echo self::constant . “\n”;
}
}
echo MyClass::constant . “\n”;
$classname = “MyClass”;
echo $classname::constant . “\n”; // As of PHP 5.3.0
$class = new MyClass();
$class->showConstant();
echo $class::constant.“\n”; // As of PHP 5.3.0
?>
Class constants
The visibility of a member property or method of a class can be defined by prefixing the declaration with the keywords: public, protected or private. Public declared items can be accessed everywhere. Protected limits access to inherited and parent classes (and to the class that defines the item). Private limits visibility only to the class that defines the item.
Parent and child class can have a private set of private variables that no-one else has access to, other than the class itself even it was inherited. Which means private members of a class can’t be overridden.
Classes begin with the keyword ‘class’, followed by the class name which the user may choose. The keyword ‘new’ used to create object from a class.
Inside the scope of a current class context, it is possible to create a objects by using keywords ‘self’ and ‘parent’;
eg: new self; new parent;
A class can inherit methods and members of another class by using the keyword ‘extends’;
eg: class inheritedclass extends parentclassname{ }
Any inherited methods and members of the parent class can be overridden, unless the parent class has defined a method by using the keyword ‘final’, by re declaring those methods or members with the same name defined in the parent class.
Web designing is the process of designing any website including the information and user frame design. It is the complete creation of a website from start to end. Web Designing is a method of Conceptualization, representation, scheduling and finishing of website content through World Wide Web or Intranet that comes in form of HTML language. Web designing is not only about creating designs, it also act like a sales and marketing means that needs to perceptive and effective for visitors. The main target of Web designing is to create a website that exists on intranet and present prominent features to users. These features including text, bitmap images (GIFs, JPEGs, and PNGs), and forms can be placed on the page using HTML/XHTML/XML tags. Websites which are designed and created with HTML are doing well, because they are well matched to World Wide Web.
The two important factors which affect website representation are: Color and Layout
Color: This feature reflects a Good or Bad impression of your website on any customer. When using color on a website, don’t use more than 3 colors and be sure that the colors you use are associated in some way. A color wheel helps you to choose color combinations for your web site. It generally displays only basic colors, but we can use this to enlighten color associations. Colors that work fine together create color harmony, which provides a good look to your website.
Layout: One of the simplest ways to design a website is by using single row tables. This helps in putting multiple columns on a web page. These multiple columns contain images, paragraphs, and Navigation tools. The single row table method does raise the quantity of code on your web pages
You should be very conscious about the website address. Your website address should be unique so that web servers can find it.
Web Designing has many parts. As far as web sites are concerned, they mainly consists these things:
- The visibility of your website on the Internet.
- From public point of view, how many information your website have.
- How your website pages are appearing on internet.
A Webmaster creates and administers the information content of a Web site. It also administers the computer server and technical programming characteristics of a Web site. All these things vary from company to company. In a small scale company, a Webmaster does everything but in a bigger company, a Webmaster tends to be someone who only does programming. On the World Wide Web, website pages appear in Hypertext Markup Language (HTML). Usually, it contains text and disclaimers about where images or other files are to be put up.
Associative Arrays
In the products array, we allowed PHP to give each item the default index. This meant that the first item we added became item 0, the second item 1, and so on. PHP also supports associative arrays. In an associative array, we can associate any key or index we want with each value.
Initializing an Associative Array
The following code creates an associative array with product names as keys and prices as values.
$prices = array( 'Tires'=>100,
'Oil'=>10, 'Spark Plugs'=>4 );
While there are numerous Web Designers and web promotion companies offering services online, there are only a few who can really help you in getting an impressive ROI for your internet based business. These web services include everything from e-commerce web solutions, custom web designing, flash website design, graphics design, logo designing, SEO and more. Let us have glance at why these web services are significant in taking your website to top positions on search engines.
PPC Advertising Services
PPC advertising is one of the most popular and cost effective approach to get targeted traffic the fast way. The most important thing here is to know where, how, and when you want your PPC ad to show up. Unlike the other internet advertising methods, you only pay for results here. You don’t have to pay a fix rate irrespective of whether your site gets visitors or not. All you have to do is set up an account, do some market research, and run your PPC ads accordingly.
Logo Designing Service
Most of the leading business brands today are well recognized by their Logos. A Logo is very vital for creating that unique brand image. Going for a professional logo designing service is a good way of getting valuable promotion and brand building for your products. You should pick a logo design service that can offer you top quality designing services at an economic pricing. The logos should also be unique and impressive enough to attract and make an impact on the audience.
Articles Submission Services
One of the most effective ways of improving search engine ranking is submitting articles to article directories. In this way, you will get useful back links from scores of high PR directories. The back links will be right there in your articles page and also the links will be very much relevant to your site’s theme. As your articles are submitted manually, it is very good for enhancing your site ranking. Article submission is an established method to promote your websites with organic traffic, without spending too much on it.
Back linking is one of the most important factors in getting a website ranked high in search engines. The more back links you have coming to your site, the better your site will rank. Other factors that go into the ranking are the authority of the site linking to you, its reputation, and its subject matter. A professional internet marketing service can get a lot of top notch and relevant websites to link to your website. You can also go for social media marketing and SEO consulting services to make sure your website is right there at the top.
Search engine submission is basically an activity to register a business’s website with major search engines. By means of this process the web pages in your website are submitted to major search engines and web directories to get top placements and positions according to their priority. Search Engine Submission also helps in getting the website crawled by major search engines at the regular interval. It is the main source of traffic for almost website. Search Engines are an effective technique to get targeted traffics to your web address. Almost 75 % users use search engines to find your website
Search engines make important links between websites to assess the content excellence of the website. This content excellence is called “page rank” in google. Getting links from other websites is tough and lengthy process. If you want to make it easier then try to concentrate on these things:
- Positioning related websites and evaluating their appropriateness to get links to your website
- Communicate to the holder of these websites with an offer to exchange links. Just have already added link to their web address first and then portray their mind to this.
It is a very big issue for business organizations that after doing all efforts, why their website are not getting good rank in major search engine results? There are several reasons behind this:
- Not having suitable and descriptive titles in the content.
- Write good content for the people. It is not necessary for search engines.
- Before submitting your website to the search engines, you should make sure that all the web pages in the website can be accessed by the search engines. Never use Flash or JavaScript to navigate between pages in the website.
A standard datatype which can hold one or more than one value.
Two Type of Array
1. Indexed Array
- Single Dimentional
- Multi Dimentional
2. Associative Array
- Single Dimentional
- Multi Dimentional
There are two types of function
1. User Defined Function
- Function without arguments
- Function with arguments
- Function with default arguments
- Function call by value
- Function call by reference
2. Pre Defined Function
- Assignment Operator
- Arithmetic Operator
- Comparison Operator Ex :
==, !=, >=, <=, <, >
===, !==
- Conditional Operator
Ex: &&, ||, !
- Intertical Operator
- Bitwise Operator
Eg. & (And), | (Or), ^ (Xor), << (Left Shift), >> (Right Shift)
- Increament / Decreament
- Ternary Operator