|
PHP is a server-side scripting language.PHP is a powerful tool for making dynamic and interactive Web pages.
PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
Before you continue you should have a basic understanding of the following:
PHP stands for PHP: Hypertext Preprocessor. PHP is an open source software, PHP files have a file extension of ".php", ".php3", or ".phtml"
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform).
A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.
For maximum compatibility, we recommend that you use the standard form (<?php) rather than the shorthand form.
<?php ?>
we have an example of a simple PHP script which sends the text "Hello World" to the browser:
<html>
<body>
<?php
echo "Hello World";
?>
</body>
</html>
All variables in PHP start with a $ sign symbol. The correct way of declaring a variable in PHP:
$var_name = value;
New PHP programmers often forget the $ sign at the beginning of the variable. In that case it will not work.
Let's try creating a variable containing a string, and a variable containing a number:
<?php
$txt="Hello World!";
$x=16;
?>
PHP is a Loosely Typed Language
In PHP, a variable does not need to be declared before adding a value to it.In the example above, you see that you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.In a strongly typed programming language, you have to declare (define) the type and name of the variable before using it.In PHP, the variable is declared automatically when you use it.
A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)
There is only one string operator in PHP.
The concatenation operator (.) is used to put two string values together.To concatenate two string variables together, use the concatenation operator:
<?php
$txt1="Hello World!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
?>
The strlen() function is used to return the length of a string.
<?php
echo strlen("Hello world!");
?>
The strpos() function is used to search for character within a string.If a match is found, this function will return the position of the first match. If no match is found, it will return FALSE.
<?php
echo strpos("Hello world!","world");
?>
You can use conditional statements in your code to do this.
In PHP we have the following conditional statements:
Use the if statement to execute some code only if a specified condition is true.
<?php
$d=date("D");
if ($d=="Fri") echo "Have a nice weekend!";
?>
Use the if....else statement to execute some code if a condition is true and another code if a condition is false.
<?php
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
else
echo "Have a nice day!";
?>
Use the if....elseif...else statement to select one of several blocks of code to be executed.
<?php
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
elseif ($d=="Sun")
echo "Have a nice Sunday!";
else
echo "Have a nice day!";
?>
This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared with the values for each case in the structure. If there is a match, the block of code associated with that case is executed. Use break to prevent the code from running into the next case automatically. The default statement is used if no match is found.
<?php
switch ($x)
{
case 1:
echo "Number 1";
break;
case 2:
echo "Number 2";
break;
case 3:
echo "Number 3";
break;
default:
echo "No number between 1 and 3";
}
?>
An array stores multiple values in one single variable. A variable is a storage area holding a number or text. The problem is, a variable will hold only one value.
An array is a special variable, which can store multiple values in one single variable.If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:
In PHP, there are three kind of arrays:
In the following example the index are automatically assigned (the index starts at 0):
$cars=array("Saab","Volvo","BMW","Toyota");
In the following example we assign the index manually:
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";
In the following example you access the variable values by referring to the array name and index:
<?php
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";
echo $cars[0] . " and " . $cars[1] . " are Swedish cars.";
?>
An associative array, each ID key is associated with a value. With associative arrays we can use the values as keys and assign values to them.
In this example we use an array to assign ages to the different persons:
$ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34);
This example is the same as example 1, but shows a different way of creating the array:
<?php
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
echo "Peter is " . $ages['Peter'] . " years old.";
?>
The while loop executes a block of code while a condition is true.
The example below defines a loop that starts with i=1. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:
<?php
$i=1;
while($i<=5)
{
echo "The number is " . $i . "<br />";
$i++;
}
?>
The do...while statement will always execute the block of code once, it will then check the condition, and repeat the loop while the condition is true. The example below defines a loop that starts with i=1. It will then increment i with 1, and write some output. Then the condition is checked, and the loop will continue to run as long as i is less than, or equal to 5:
<?php
$i=1;
do
{
$i++;
echo "The number is " . $i . "<br />";
}
while ($i<=5);
?>
The for loop is used when you know in advance how many times the script should run.
for (init; condition; increment)
{
code to be executed;
}
Parameters:
<?php
for ($i=1; $i<=5; $i++)
{
echo "The number is " . $i . "<br />";
}
?>
The foreach loop is used to loop through arrays. For every loop iteration, the value of the current array element is assigned to $value (and the array pointer is moved by one) - so on the next loop iteration, you'll be looking at the next array value.
<?php
$x=array("one","two","three");
foreach ($x as $value)
{
echo $value . "<br />";
}
?>
Output:
one
two
three
The real power of PHP comes from its functions.In PHP, there are more than 700 built-in functions.
In this chapter we will show you how to create your own functions.To keep the browser from executing a script when the page loads, you can put your script into a function.A function will be executed by a call to the function.You may call a function from anywhere within a page.
<?php
function writeName()
{
echo "Kai Jim Refsnes";
}
echo "My name is ";
writeName();
?>
To add more functionality to a function, we can add parameters. A parameter is just like a variable.
<?php
function writeName($fname)
{
echo $fname . " Refsnes.<br />";
}
echo "My name is ";
writeName("Kai Jim");
echo "My sister's name is ";
writeName("Hege");
echo "My brother's name is ";
writeName("Stale");
?>
<?php
function writeName($fname,$punctuation)
{
echo $fname . " Refsnes" . $punctuation . "<br />";
}
echo "My name is ";
writeName("Kai Jim",".");
echo "My sister's name is ";
writeName("Hege","!");
echo "My brother's name is ";
writeName("Ståle","?");
?>
The rest of php basic is detailed on next tutorials, watch it.
Intel Core is a brand name used for various mid-range to high-end consumer and business microprocessors. In general, processors sold as Core are more powerful variants of the same processors marketed as entry-level Celeron and Pentium. Similarly, identical or more capable versions of Core processors are also sold as Xeon processors for the server market.
The current lineup of Core processors includes the latest Intel Core i7, Intel Core i5 and Intel Core i3, and the older Intel Core 2 Solo, Intel Core 2 Duo, Intel Core 2 Quad and Intel Core 2 Extreme lines.
Most of The billionaire reveals ”It was hard to avoid the carnage, whether you were in stocks, commodities, real estate or currencies. Even people running fine businesses could have been killed by frozen credit markets, weak consumer spending or fraud.”
Forbes says ”Last year Moscow overtook New York as the billionaire capital of the world, with 74 tycoons to New York's 71. Today there are 27 in Moscow and 55 in New York.” The New York again set back as the billionaire capital of the world.
This year the world's billionaires have an average net worth of $3 billion, down 23% in 12 months. The world now has 793 billionaires, down from 1,125 a year ago.
Telangana is a region of the Andhra Pradesh state in India. It has area of 1,14,840 km2. and its population is 3,06,96,520 according to the 2001 census. The name means "land of Telugu people". It consists of the Telugu speaking parts of the state of Hyderabad. The region lies on the Deccan plateau to the west of the Eastern Ghats range, and includes the northwestern interior districts of Andhra Pradesh state. Telangana region has 10 districts. They are Warangal, Adilabad, Khammam, Mahabubnagar, Nalgonda, Rangareddy, Karimnagar, Nizamabad, Medak, and the state capital of Andhra Pradesh, Hyderabad. The Krishna and Godavari rivers flow through the region from west to east.
On December 9, 2009, the Government of India announced that the process for the formation of Telangana state will be initiated upon introduction and passage of a separation statement by the state assembly of AP. However, on December 23, 2009, the Government of India announced that the issue of a new state will be addressed only after a consensus is reached, thus effectively putting the formation of the new state in abeyance.
In December 1953, the States Reorganization Commission was appointed to prepare for the creation of states on linguistic lines. The States Reorganization Commission (SRC) was not in favour of an immediate merger of Telangana region with Andhra state, despite the common language between the two.
Para 382 of States Reorganization Commission Report (SRC) said "opinion in Andhra is overwhelmingly in favour of the larger unit, public opinion in Telangana has still to crystallize itself. Important leaders of public opinion in Andhra themselves seem to appreciate that the unification of Telangana with Andhra, though desirable, should be based on a voluntary and willing association of the people and that it is primarily for the people of Telangana to take a decision about their future". Telanganas had several concerns. The region had a less developed economy than Andhra, but with a larger revenue base (mostly because it taxed rather than prohibited alcoholic beverages), which Telanganas feared might be diverted for use in Andhra. They also feared that planned dam projects on the Krishna and Godavari rivers would not benefit Telangana proportionately even though Telanganas controlled the headwaters of the rivers. Telanganas feared too that the people of Andhra who had access to higher education, would have the advantage in government and educational jobs.
The commission proposed that the Telangana region be constituted as a separate state with a provision for unification with Andhra state, after the 1961 general elections, if a resolution could be passed in the Telangana state assembly with two-third majority.
The Chief Minister of Hyderabad State, Burgula Ramakrishna Rao strongly believed majority of Telangana people were against the merger.
Prime minister Jawaharlal Nehru initially ridiculed the idea of merging Telangana with the Andhra State, fearing a “tint of expansionist imperialism” in it. Later, he compared the merger to a matrimonial alliance having “provisions for divorce” if the partners in the alliance cannot get on well.However, following the "Gentlemen's agreement, the central government, established a unified Andhra Pradesh on November 1, 1956. The agreement provided reassurances to both parties in terms of power sharing as well as administrative domicile rules and distribution of expenses of various regions.
A blogger is a person who writes a blog (or weblog). Bloggers are not a homogenous group. They have a variety of personal and professional motivations for blogging and they come from a variety of political, economic and social backgrounds.
One way of segmenting bloggers is by their blog type:
Blogging is not a full-time job for most bloggers, nor is it their main source of income. A blogger can also be a doctor, a mechanic, a lawyer or a musician, and thus bloggers typically maintain a variety of professions for which the act of blogging is their communicative outlet with the public.
To create blogger account. first,visit www.blogger.com from google organisation. Below the Blogger home page is displayed.
Create an account with using gmail account, Presence of your personal information.
Log-in blogger account column. After create an account, login using username and password.
This is the home page for your own blog account.using Dashboard we can access new post, edit post,Settings, Layout.
This is layout settings which is preferred to design a page element, themes, gadget and customise a blogger website for our own pleasure and professional.
This is my blogger website with normal theme, gadget, page element.
This tutorial of Blogger account setup helps you more to create an individual blog website. The future tutorial about how to add your blog with google analytics. keep on track with us.
Prabhakaran was killed by the Sri Lankan military in Nanthikadal lagoon in Mullaitivu on May 18 last year.
Amid several reports asserting that Liberation Tigers of Tamil Eelam (LTTE) chief V Prabhakaran is still alive and safe, a proof hinting towards the authenticity of these reports has emerged.Sri Lankan military make fake on alike Prabhakaran’s body.
A pro-LTTE website, tamilwin.com, claims that the the body shown by the Sri Lankan government as that of Prabhakaran was fake and that it belonged to a look-alike Sri Lankan soldier.
Prabhakaran along with his intelligence chief Pottu Amman were declared proclaimed offenders after a LTTE suicide bomber blew up Rajiv Gandhi near Chennai in May 1991. Indian government convicted Prabhakaran for murder case under corresponding section on IPC(Indian Penal Code). The issues on Prabhakaran’s death.Indian Government claims to srilankan govt to issue”The Death Certificate of (LTTE) chief V Prabhakaran for prolong murder case of Rajiv Gandhi.”
The remark follows a CBI statement last year, in response to an RTI(Right to Information) application, that it was not yet to get the death certificate of Prabhakaran,(LTTE) to close Rajiv Gandhi’s murder case.
Home Minister P Chidambaram said yesterday, India has got official confirmation of Prabhakaran’s death from srilankan govt.
The Mozart of Madras, AR Rahman, won two Grammy Awards for his music in the Oscar-winning film Slumdog Millionaire.
At the 52nd Annual Grammy Awards in Los Angeles on Sunday night (Monday morning in India), Rahman struck the first gold at the pre-show.
His score in Slumdog Millionaire won the best compilation soundtrack for a motion picture category.
"This is insane, god is great again," Rahman said as he accepted his second award before a VIP audience.Rahman's rivals in the soundtrack category included Steve Jordan for "Cadillac Records," Quentin Tarantino for "Inglourious Basterds", and the producers of "Twilight" and "True Blood."
In the best song category Rahman's beaten rivals included Bruce Springsteen for his song "The Wrestler", from the Oscar-nominated movie of the same name.
Washington, Jan 28 (IANS) Two Indians, energy King Mukesh Ambani and steel Vista Lakshmi Mittal, have made it to the Forbes list of 'World's Most Powerful Billionaires' combining massive fortunes with political clout.
'Through his industrial might, India's richest person, Mukesh Ambani, ranks eighth,' in the US business magazine's annual list topped by Michael Bloomberg, mayor of New York City. Mittal ranks 13th on the list.
'Ambani controls oil and gas conglomerate Reliance Industries. With a market value of more than $73 billion, the firm is India's biggest independent company.'
Compatriot Lakshmi Mittal - India's second wealthiest with a net worth of $30 billion - heads ArcelorMittal, the world's largest steel maker, and ranks 13th on the list. The steel giant operates in 60 countries and has market value of $65 billion.
Mukesh Ambani, Forbes noted, inherited father Dhirubhai's massive industrial empire with brother Anil in 2002. 'Brothers battled over power, divided assets. Mukesh controls energy entities; Anil leads banking and telecom companies.'
Mittal started in the family steel business in the 1970s, broke out on his own in 1994 and is now planning joint iron venture in Liberia and Guinea with miner BHP Billiton, it noted. 'Bought 12-bedroom mansion in Kensington for more than $100 million in 2004; was London's most expensive home at the time.'
Business people add more flavor to their Industrial campaigns, Even, They are not stagnant in a drought economy. Billionaires characterized by Enhancement in development, advancement, or progressive movement.
On March 11, 2009, Forbes ranked Slim as the world's third-richest person, behind Bill Gates and Warren Buffett and ahead of Lawrence Ellison. Since last year Slim lost US$25 billion.(On paper)
On March 5, 2008, Forbes ranked Slim as the world's second-richest person, behind Warren Buffett and ahead of Bill Gates. During some parts of 2007, several major financial publications had ranked Slim as the richest person on Earth.
On August 8, 2007, Fortune reported that Slim had overtaken Gates as the world's richest man. Slim's estimated fortune soared to US$68 billion, based on the value of his public holdings at the end of July. Gates net worth was estimated to be at least US$58 billion.
On August 4, 2007, The Wall Street Journal ran a cover story profiling Slim. The article said, "While the market value of his stake in publicly traded companies could decline at any time, at the moment he is probably wealthier than Bill Gates". On March 29, 2007, Slim surpassed Warren Buffett as the world's second richest person with an estimated net worth of US$53.1 billion compared to Buffett's US$52.4 billion. According to The Wall Street Journal, Slim credits part of his ability to discover investment opportunities early to the writings of his friend, futurist author Alvin Toffler.
Minutes after he was declared the victor in the 2010 presidential election, Sri Lankan President Mahinda Rajapaksa told reporters that the outcome of the poll demonstrated the maturity of the people of the island nation.
Of the 14 million voters, nearly over a million exercised their franchise.
The Sri Lankan president, Mahinda Rajapaksa, today called for national unity after winning a controversial election, a result immediately contested by his rival creating a tense political standoff in the capital.
Even as Rajapaksa was declared the victor with 57.8% of the vote, General Sarath Fonseka, the former head of the army, who received 40%, said he would begin legal proceedings to have the result annulled. Fonseka also accused the government of wanting to kill him by removing his personal security detail.
A report posted on the website of the main opposition United National Party (UNP) quoted the deputy leader of the party as saying after the announcement of the election results, the government posed a threat to the life and career of General Fonseka and was holding him captive at the Hotel Trans Asia, where he was staying. It quoted him as saying that over 300 service personnel had been posted to restrict the General’s free movement.
Poll Results:
UPFA
Mahinda Rajapaksa 57.88% 6,015,934.
NDF
Sarath Fonseka 40.15% 4,173,185.
Republic Day is a special day for us Indians and we take this opportunity to salute all our leaders and freedom fighters of the past who have taken great risks, made tremendous sacrifice, the fruits of which we are enjoying today -Called Freedom!
Republic Day is India's great national festival. It is celebrated every year on January 26, in New Delhi with great pomp and pageant and in capitals of the States, as well as at other headquarters and important places with patriotic fervour.
It was the Lahore Session of the Indian National Congress at midnight of December 31, 1929 - January 1, 1930, that the Tri-Colour Flag was unfurled by the nationalists and a pledge taken that every year on January 26, the "Independence Day" would be celebrated and that the people would unceasingly strive for the establishment of a Sovereign Democratic Republic of India. The professed pledge was successfully redeemed on January 26, 1950, when the Constitution of India framed by the Constituent Assembly of India came into force, although the Independence from the British rule was achieved on August 15, 1947.
It is because of this that August 15 is celebrated as Independence Day, while January 26 as Republic Day.
The Republic Day celebrations have rightly become world famous as one of the greatest shows on earth drawing thousands of eager sight-seers from all over the country and many parts of the world.
Be Indian, Buy Indian