Wednesday, 31 December 2014

ucwords

Converts first character of each word in string to upper case
Example
<?php

echo ucwords("happy new year"); // print output Happy New Year?>


ucfirst

Its converts first character of string to upper case
Example
<?php

echo ucfirst("My StriNG"); // print output My string?>


lcfirst

convert first character of string to lower case
Example
<?php

echo lcfirst("My StriNG"); // print output my StriNG?>

strtoupper()

Its convert your string to Upper case 
Example
<?php

echo strtoupper("my sTring"); // print output MY STRING

?>

strtolower()

Its convert your string to lower case 
Example
<?php

echo strtolower("My StriNG"); // print output my string?>



Tuesday, 30 December 2014

Use B.I.F Of Php for Variables

first of all let you know what is B.I.F ? its just built in function of php ;) nothing new 

  • strtolower()
  • strtoupper()
  • ucfirst()
  • lcfirst()
  • ucwords()

PHP Variables

assuming that familiar with programming concepts

In PHP you define a variable with the following form:

$variable_name = Value;

If you forget that dollar sign at the beginning, it will not work. This is a common mistake for new PHP programmers!

PHP supports a number of different variable types: integers, floating point numbers, strings and arrays. In many languages, it's essential to specify the variable type before using it: for example, a variable may need to be specified as type integer or type array. Give PHP credit for a little intelligence, though: it automatically determines variable type by the context in which it is being used! 

Important Note:Variable names in PHP are case sensitive, so $php is different from $Php or $PHP

Monday, 22 December 2014

PHP Basics Concepts



PHP Tags:

PHP lets you embed PHP code in regular HTML pages, and execute the embedded PHP 
code when the page is requested. 
These embedded PHP commands are enclosed within special start and end tags, like this:
 

<?php ... Your PHP code ... ?>

Lets Start Coding

Lets Start From Hello World :) :

Simple example of php to print name on webpage with combination of html
<html> <head></head> <body> <p>Html work</p> <br/> <?php // print output echo 'echo command print on webpage'; ?> </body> </html>

Tuesday, 16 December 2014

Installation Guide

Software Required:

PHP Breif Intro

Hi every one!

First Of All History of PHP:

PHP was invented by Rasmus Lerdorf in 1995. He is known as Father of PHP. He started PHP as a replacement for various Perl scripts. He used PHP to maintain his personal web page. PHP takes most of its syntax from C, Java, and Perl. PHP was written in C programming language.

PHP – Server-Side Scripting Language


PHP is a server-side scripting language, which means that PHP scripts, or programs, usually run on a Web server. The process of running a PHP script on a Web server looks like this:
A visitor requests a Web page by clicking a link, or typing the page’s URL into the browser’s address bar. The visitor might also send data to the Web server at the same time, either using a form embedded in a Web page, or via AJAX (Asynchronous JavaScript And XML).
The Web server recognizes that the requested URL is a PHP script, and instructs the PHP engine to process and run the script.
The script runs, and when it’s finished it usually sends an HTML page to the Web browser, which the visitor then sees on their screen.

PHP – A Powerful Web Scripting Language

The interesting stuff happens when a PHP script runs. Because PHP is so flexible, a PHP script can carry out any number of interesting tasks, such as:
Reading and processing the contents of a Web form sent by the visitor
Reading, writing, and creating files on the Web server
Working with data in a database stored on the Web server
Grabbing and processing data from other Web sites and feeds
Generating dynamic graphics, such as charts and manipulated photos

PHP – A Great Choice for Web Applications

Web forums that allow visitors to post messages and discuss topics
Search engines that let people search the contents of a Web site or database
Straw poll scripts that enable visitors to vote in polls and surveys
Content management systems and blogs, which enable Webmasters to create sites easily with minimal technical knowledge
Webmail applications, allowing people to send and receive email using their Web browser
Online stores, allowing shoppers to purchase products and services over the Internet