Saturday , April 20 2024
Home / v.shakya (page 4)

v.shakya

I am V.Shakya, Software Developer & Consultant I like to share my ideas, views and knowledge to all of you who come across my website. I am young, enthusiastic, highly motivated and self disciplined person. I completed my studies in Master of Computer Application and currently giving my technical expertise to one of the Big IT company. I have more than fifteen years of experience in vast field of Programming , Designing and Development of websites and various software's.

PHP 5 Functions

The real power of PHP comes from its functions; it has more than 1000 built-in functions. PHP User Defined Functions Besides the built-in PHP functions, we can create our own functions. A function is a block of statements that can be used repeatedly in a program. A function will not …

Read More »

PHP 5 for Loops

PHP for loops execute a block of code a specified number of times. The PHP for Loop The for loop is used when you know in advance how many times the script should run. Syntax for (init counter; test counter; increment counter) { code to be executed; } Parameters: init …

Read More »

PHP 5 while Loops

PHP while loops execute a block of code while the specified condition is true. PHP Loops Often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal code-lines in a script, we can use …

Read More »

PHP 5 switch Statement

The switch statement is used to perform different actions based on different conditions. The PHP switch Statement Use the switch statement to select one of many blocks of code to be executed. Syntax switch (n) { case label1: code to be executed if n=label1; break; case label2: code to be …

Read More »

PHP 5 if…else…elseif Statements

Conditional statements are used to perform different actions based on different conditions. PHP Conditional Statements Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this. In PHP we have the following conditional statements: if …

Read More »

PHP 5 Operators

This chapter shows the different operators that can be used in PHP scripts. PHP Arithmetic Operators Operator Name Example Result + Addition $x + $y Sum of $x and $y – Subtraction $x – $y Difference of $x and $y * Multiplication $x * $y Product of $x and $y …

Read More »

PHP 5 Constants

Constants are like variables except that once they are defined they cannot be changed or undefined. PHP Constants A constant is an identifier (name) for a simple value. The value cannot be changed during the script. A valid constant name starts with a letter or underscore (no $ sign before …

Read More »

PHP 5 String Functions

A string is a sequence of characters, like “Hello world!”. PHP String Functions In this chapter we will look at some commonly used functions to manipulate strings. The PHP strlen() function The strlen() function returns the length of a string, in characters. The example below returns the length of the …

Read More »

PHP 5 Data Types

String, Integer, Floating point numbers, Boolean, Array, Object, NULL. PHP Strings A string is a sequence of characters, like “Hello world!”. A string can be any text inside quotes. You can use single or double quotes: Example <?php $x = "Hello world!"; echo $x; echo "<br>"; $x = 'Hello world!'; …

Read More »

PHP 5 echo and print Statements

In PHP there are two basic ways to get output: echo and print. In this tutorial we use echo (and print) in almost every example. So, this chapter contains a little more info about those two output statements. PHP echo and print Statements There are some differences between echo and …

Read More »