PHP STRING FUNCTIONS - PHP LESSON 6 STUDENTSBLOG100


In this Php tutorial 6, we are gonna to study about php basic string functions that a developer must know.

The two main string functions in php are
  • String Length
  • String Position
String Length:
This function is used to find the length of the string.

Syntax:
  • strlen("string") or strlen(stringname)
Example:


Output:
16
5

String Position:
This function is used to find the position of the string.

Syntax:
  • strpos("string","a letter or word to find its position");
Example:


Output:
8
12

Note : Count of string will be start by 0.

Lesson 5 Previous | Lesson 0 | Next Lesson 7

Read more ...

ANNA UNIVERSITY RANK HOLDERS LIST 2014 FOR UG

Anna University announced the Rank List for affiliated colleges for the April/May 2014 examination on 19-10-2014. Now you can check your x-final year college student's rank list. This rank list was listed based on Anna University ranking rules. 
Congratulation for all the students who secured top ranks in Anna University affiliated colleges.
ANNA UNIVERSITY RANK HOLDERS LIST 2014
ANNA UNIVERSITY RANK HOLDERS LIST 2014
To see Rank Holders List --> Click Here

How to get University Rank :
  • A candidate should get pass in all the subjects in first class or first class with distinction in the first attempt.
  • And some calculations will be done to select the rank holders at the rate of 1 for every 20 students who are eligible as above.
Read more ...

PHP OUTPUT STATEMENTS - PHP LESSON 5 STUDENTSBLOG100


In this tutorial we are going to discuss about output statements in PHP. In C Programming language the output statement is printf, In C++ Programming language the output statement is cout <<. Like the same in PHP Programming language, the output printing statement is echo. Totally there are two methods to print output in PHP.

Two output statements in  PHP are..
  • Echo
  • Print
Echo:
Used for printing one and more lines in output

Syntax:

Output:
Hello World!
1st string 2nd string 3rd string

Print:
Used for printing one line.. We suggest to use echo statement to print output in php.

Syntax:

Output:
Hello World!

Lesson 4 Previous | Lesson 0 | Next Lesson 6

Read more ...

VARIABLE DECLARATION IN PHP - PHP LESSON 4 STUDENTSBLOG100

Variables:
Variables are used to hold different types of data. Some data types are Integer, character, float, double, string etc..

PHP Variable Declaration :
  • Variable have to begin with a dollar sign ($).
  • After the $ symbol, variable names can be begin with a letter or a Under score(_). Variable names cannot be started with a number in php.
  • Variable names are case sensitive. That is $firstname is a completely different variable than $FirstName.
PHP Data Types :
Segment
Type
Description
Scalar types Boolean Logical TRUE or FALSE
Integer Whole numbers: e.g 1,2,3...
Float (double) Numbers with decimal notations e.g., 12.56 or 345.456
String Characters, letters, or numbers (usually defined within double quotes): e.g., “Hello there”
or “123AsR”
Compound types Array A collection of keys with their values, arrays can hold other arrays (multidimensional);
Object The basics for class definitions and object-oriented programming;
Special types Null Defines a variable with no value; the variable exists, but contains nothing (not an empty
string, not the value 0, nothing)
Resource Stores a reference to functions, databases, files, or other resources outside of PHP

Assigning Values to Variables:
There are two ways to assign values to variables,they are
  • by value
  • by reference
By Value:
Syntax:
  • $variablename = value;
Example:
  • $a = 12;
  • $b = "StudentsBlog100";
By reference:
Syntax:
  • $firstname = "Peter"; // assigned by value
  • $fname = &$firstname; // $firstname is assigned to $fname by reference.

Example:
 
Output:
Hello StudentsBlog100! 
 5 
10.5

Lesson 3 Previous | Lesson 0 | Next Lesson 5

Read more ...