Adding CSS style in php script

<?php


       echo '<span style="font-size:10px">';    // add  styles as  style attribute
       echo 'test';
       echo '</span> ';
       echo '<p style="font-size:20px">';
       echo $title    = $_POST['text'];
       echo "</p>";
      

?>


In PHP, all variable names begin with a dollar sign ($). The $ is followed by an
 alphabetic character or an underscore, and optionally followed by a sequence of
 alphanumeric characters and underscores. There is no limit on the length of a
variable name. Variable names in PHP are case-sensitive. Here are some examples:

$k
$cot
$Sar_name
$_MPS

In PHP, unlike in many other languages, you do not have to explicitly declare variables.
 PHP automatically declares a variable the first time a value is assigned to it.
PHP variables are untyped; you can assign a value of any type to a variable.

PHP uses a symbol table to store the list of variable names and their values.
There are two kinds of symbol tables in PHP: the global symbol table, which stores
the list of global variables, and the function-local symbol table, which stores the
set of variables available inside each function.


 Dynamic Variables
Sometimes it is useful to set and use variables dynamically. Normally, you assign a variable like this:

$var = "derro";
Now let's say you want a variable whose name is the value of the $var variable. You can do that like this:

$$var = "Jinna";
PHP parses $$var by first dereferencing the innermost variable, meaning that
$var becomes "derro". The expression that's left is $"hello", which is just $derro.
 In other words, we have just created a new variable named hello and assigned it
the value "Jinna". You can nest dynamic variables to an infinite level in PHP,
although once you get beyond two levels, it can be very confusing for someone who
is trying to read your code.

dhoom 3 - back in action


Dhoom 3 - back in action, most awaited bollywood movie watch trailers, promos,
 wallpaper, news about movie and stars aamir khan, katrina kaif, bipasha basu.

Director vijay krishna acharya s dhoom 3 is doing well at the box-office the film
 has grossed rs 101 crore in the first week at the box-office.dhoom 3 written and
directed by vijay krishna acharya and produced by aditya chopra.






Targeted Website Traffic

Getting traffic online is very easy to do. The most important part about being successful online
is getting your website noticed. You should be spending most of your days promoting your site over
anything else in order to make money off of it.

I was once clueless about how to even create traffic online let alone even knowing what traffic meant.
Well, it has been about a year since I have been inthis online marketing business and has really
become my second nature.

Here I would like to share with you the simplest ways in which you can drive traffic to your site
immediately. Just remember the more things that youdo on the list below the better results you will
have with the traffic to your website. Hopefully after you are done reading threw this article you can
get busy on the promotion of your website.

Here are the few best ways to get traffic to your landing pages:
- Forum Participation
Article Marketing
Social Bookmarking
Myspace
Press Releases
Classified Ads
Viral Marketing
All of these forms of traffic combined can explode your sites traffic within days. When choosing the
proper sites in which you want to work with to create your traffic, make sure you choose the ones that
are highly ranked within Google. That way you can easily get first page results for your website. I ama
firm believer of article marketing myself. You don't necessarily have to use that form of traffic if
you don̢۪t want to but it will help you out in thelong run for creating many back links to your site.
Just always remember that consistency is always to best attitude to have when you have your own
business online. You have to stay devoted and on task when you are promoting your sites. Promotion is
the most important part about making money online. You can have the nicest website in the world but
it will never see the time of day if you never get the word out there that you are in business.
If you feel like you don't really have a startingpoint or you are not to sure on how to do the
above traffic generation techniques or if you wouldlike a guide on how to master in Internet Marketing
feel free to check out more of my articles.

Php-Associative Arrays

Arrays are another basic structure in programming languages. Arrays provide means for
storing a fixed set (or collection) of the same datatype in a convenient way, making
each element of your set indexable by using a unique key.

In the typical "conventional" programming languages, arrays are handled like this:

int my_int_array[786];          // allocate 786 integers in this array
This C code snippet declares an array called my_integer_array, containing 256 integers.
 You can address each of these integers by indexing the array with an ordinal value, for this array in a range from 0 to 255. (C starts counting from 0; the given number in the array definition specifies the number of integers you want to have available.) Indexing looks like this:

int my_integer = my_integer_array[4];
This retrieves the fifth element remember, C starts counting from 0 from the array
 and stores it in my_integer.

Arrays for coding
 Contents of Arrays can be stretched,
 Arrays easily help group related information such as server login detailstogether
 Arrays help write cleaner code.


 Arrays are special variableswith the capacityto store multi values.
 Arrays are flexibilityand can be easily stretchedto accommodate more values
 Numeric arraysuse numbers for the array keys
 Associative arraysuse descriptive namesfor array keys
 Multidimensionalarrays contain other arrays insidethem.
 The countfunction is used to get the numberof itemsthat have been stored in an array
 The is_arrayfunction is used to determinewhether a variableis a valid array or not.
 Other array functions include sort, ksort, assort etc.

 

Due to the nature of compiled languages, you were always bound to the previous
 definition of your variables. If you suddenly needed more than 256 integers in the array above, this was impossible. Of course, you could have defined this variable as a pointer to an integer array and allocated 257 elements for it—but what if you suddenly needed another element? You'd have to allocate new space, copy the old array contents, and free up the old, unused space.

PHP takes a different approach. Because PHP knows no typical variable declarations only type definitions
), new variables are allocated on the fly. Whenever you create a new variable by introducing its
 name into the namespace, you simply create storage space bound to this name—nothing more. The kind of data residing in this space is not restricted to a certain variable type. It can be reinterpreted on the fly, and of course resized, reallocated, whatever.

Take a look at this:

$my_var = 1;
$my_var = "Used to be an integer";
$my_var = array("Oh well, I like arrays better");


The first line creates a new variable $my_var.




PHP will find that an integer is going to be assigned to it; thus it sets the initial
 type of $my_var to integer. The second line, however, overwrites the contents of $my_var
 with a string. Using one of the conventional programming languages, this would have
resulted in an error at compile time, or at least an exception during runtime.
But PHP dynamically changes the type of $my_var to String and reallocates the variable
 so that enough storage space for the string is available. The third line then changes
the type of $my_var once more by creating an array out of it. PHP handles all cases
 transparently without complaining. (We know that other languages out there exist
without strict variable types.

Note: PHP 3.0 doesn't have proper garbage collection. When reallocating a variable,
 memory that's already allocated is not always being reused. In long-term scripts or
 scripts doing heavy processing.

Because formal variable declarations are not needed in PHP variable usage is completely
 dynamic. A special case in PHP's dynamic variable handling is arrays. You probably
know the common array type, the indexed array. Indexed arrays are arrays that are
indexed by ordinal numbers. These ordinal indices typically range from 0 to n, n
being the highest possible index. Languages such as Pascal allow indexing with
different ranges such as from 3 to 18; however, these ranges are transformed back
to 0-based indexes at runtime. The key feature of these ordinally indexed arrays is
that you can compute another index from any given base index. For example, suppose
you want to read out three consecutive array elements, starting from index 2:

$base_index = 2;

for($i = $base_index; $i < $base_index + 3; $i++)
    print("Element $i is $my_array[$i]<br>");
In every iteration of the for() statement, this little snippet computes the next
 index into the array by incrementing $i.

Associative arrays don't have this feature. The special thing about associative arrays
 is that they can be indexed with non-ordinal keys, such as strings, for example.
Every string used as an index has a value associated to it, thus the name associative arrays.
 As you can imagine, giving a string as base index doesn't allow guessing the next valid index
in the array. Thus, associative arrays can't be used to order data elements in an ordinal way.
 You have to know the array keys to retrieve their associated values.

Apart from that, the functions list() and each(), discussed earlier,
can be used to traverse associative arrays.

Indexed arrays are just a special form of associative arrays in PHP. Doing an unset() on
one of the elements in an indexed array will leave all other elements and their ordering
 intact, but produce a nonconsecutive array. See the earlier descriptions of
list() and each() for details.

Multidimensional Arrays
As the name suggests, multidimensional arrays are arrays with more than just one dimension.
 One-dimensional (or single-dimensional) arrays are the form in which arrays are mostly seen:

$my_array[0] = 1;
$my_array[1] = 777;
$my_array[2] = 45;

To index this type of array, you only need one index, which limits the number of possible
values to the range of this index. But it's often very useful to create multidimensional
arrays when handling complex datasets. Typical examples include bitmaps and screen buffers.
 When you look at your monitor, you see at least these days a two-dimensional projection of
 your desktop. The windows, bitmaps, command lines, cursors, pointers—everything is 2D.
To represent this data in a convenient way, you could of course serialize everything
into arrays with a single dimension—but the more appropriate method is to use arrays
with dimensions equal to those of the input data. For example, in order to store a bitmap
a set of pixels for a mouse pointer, you just add another index to your array:

// clear mouse bitmap
for($x = 0; $x < MOUSE_X_SIZE; $x++)
    for($y = 0; $y < MOUSE_Y_SIZE; $y++)
        $mouse_bitmap[$x][$y] = 0;

sonakshi sinha-The Beauty


Deepika Padukone- THe Miracle



Kareena Kapoor- the magic


























katrina-kaif-the gr8


LOAD DATA INFILE statement MySQL

LOAD DATA INFILE provides an alternative to INSERT for adding new
records to a table. With INSERT, you specify data values directly in the INSERT statement.
 LOAD DATA INFILE reads the values from a separate datafile.

The simplest form of the LOAD DATA INFILE statement specifies only the name of the datafile
 and the table into which to load the file:


LOAD DATA INFILE 'file_name' INTO TABLE table_name;


The filename is given as a string and must be quoted. MySQL assumes, unless told otherwise,
 that the file is located on the server host, that it has the default file format
tab-delimited  and newline-terminated lines, and that each input line contains a value
 for each column in the table. However, LOAD DATA INFILE has clauses that give you control
 over each of those aspects of data-loading operations and more:

Which table to load

The name and location of the datafile

Which columns to load

The format of the datafile

How to handle duplicate records

Whether to ignore lines at the beginning of the datafile

The syntax for LOAD DATA INFILE is as follows, where optional parts of
 the statement are indicated by square brackets:


LOAD DATA [LOCAL] INFILE 'file_name'

    [IGNORE | REPLACE]

    INTO TABLE table_name

    format_specifiers

    [IGNORE n LINES]

    [(column_list)]




The following sections explain how the various parts of the statement work.

Specifying the Datafile Location
LOAD DATA INFILE can read datafiles that are located on the server host
 or on the client host:

By default, MySQL assumes that the file is located on the server host.
The MySQL server reads the file directly.

If the statement begins with LOAD DATA LOCAL INFILE rather than with LOAD DATA INFILE,
 the file is read from the client host on which the statement is issued. In other words
, LOCAL means local to the client host from which the statement is issued. In this case,
 the client program reads the datafile and sends its contents over the network to the server.

The rules for interpreting the filename are somewhat different for the server
host and the client host.

Specifying the Location of Files on the Server Host
Without LOCAL in the LOAD DATA INFILE statement, MySQL looks for the datafile
 located on the server host and interprets the pathname as follows:

If you refer to the file by its full pathname, the server looks for the file
 in that exact location.

If you specify a relative name with a single component, the server looks for
the file in the database directory for the default database. (This isn't necessarily
the database that contains the table into which you're loading the file.)

If you specify a relative pathname with more than one component, the server
 interprets the name relative to its data directory.

Suppose that the server's data directory is /var/mysql/data, the database directory
 for the test database is /var/mysql/data/test, and the file data.txt is located in
that database directory. Using the filename interpretation rules just given, it's
possible to refer to the data.txt file three different ways in a LOAD DATA INFILE statement:

You can refer to the file by its full pathname:


LOAD DATA INFILE '/var/mysql/data/test/data.txt' INTO TABLE t;


If test is the default database, you can refer to a file in the database directory
using just the final component of its pathname:



LOAD DATA INFILE 'data.txt' INTO TABLE t;




You can refer to any file in or under the server's data directory by its
 pathname relative to that directory:

LOAD DATA INFILE './test/data.txt' INTO TABLE t;


Specifying the Location of Files on the Client Host
If you use LOCAL to read a datafile located on the client host, pathname
interpretation is simpler:

If you refer to the file by its full pathname, the client program looks for
 the file in that exact location.

If you specify a relative pathname, the client program looks for the file relative
 to its current directory. Normally, this is the directory in which you invoked the program.

Suppose that there's a datafile named data.txt located in the /var/tmp directory
on the client host and you invoke the mysql program while located in that directory.
 You can load the file into a table t using either of these two statements:


LOAD DATA LOCAL INFILE '/var/tmp/data.txt' INTO TABLE t;

LOAD DATA LOCAL INFILE 'data.txt' INTO TABLE t;


The first statement names the file using its full pathname. The second names the file relative
 to the current directory. If you invoke the mysql program in the /var directory instead, you
 can still load the file using the same full pathname. However, the relative pathname to the
 file is different than when running the program in the /var/tmp directory:


LOAD DATA LOCAL INFILE 'tmp/data.txt' INTO TABLE t;




Specifying Filenames on Windows
On Windows, the pathname separator character is \, but MySQL treats the backslash as
 the escape character in strings. To deal with this issue, write separators in Windows
 pathnames either as / or as \\. To load a file named C:\mydata\data.txt, specify the filename
 as shown in either of the following statements:






LOAD DATA INFILE 'C:/mydata/data.txt' INTO TABLE t;

LOAD DATA INFILE 'C:\\mydata\\data.txt' INTO TABLE t;

 Loading Specific Table Columns
By default, LOAD DATA INFILE assumes that data values in input lines are present
 in the same order as the columns in the table. If the datafile contains more columns
 than the table, MySQL ignores the excess data values. If the datafile contains too
few columns, each missing column is set to its default value in the table. This is the same
way MySQL handles columns that aren't named in an INSERT statement.


If input lines don't contain values for every table column, or the data values are not in
the same order as table columns, you can add a comma-separated list of column names within
 parentheses at the end of the LOAD DATA INFILE statement. This tells MySQL how columns in
 the table correspond to successive columns in the datafile.

PHP identical operator ===

Variable types are also important in comparison.When you compare two variables
with the identical operator (===), like this, the active types for the zvals are compared,
and if they are different, the comparison fails outright:
$a = 0;
$b = ‘0’;
echo ($a === $b)?”Match”:”Doesn’t Match”;
For that reason, this example fails.
With the is equal operator (==), the comparison that is performed is based on the
active types of the operands. If the operands are strings or nulls, they are compared as
strings, if either is a Boolean, they are converted to Boolean values and compared, and
otherwise they are converted to numbers and compared.Although this results in the ==
operator being symmetrical (for example, if $a == $bis the same as $b == $a), it actually
is not transitive.The following example of this was kindly provided by Dan Cowgill:
$a = “0”;
$b = 0;
$c = “”;
echo ($a == $b)?”True”:”False”; // True
echo ($b == $c)?”True”:”False”; // True
echo ($a == $c)?”True”:”False”; // False
Although transitivity may seem like a basic feature of an operator algebra, understanding
how ==works makes it clear why transitivity does not hold. Here are some examples:
n “0” == 0because both variables end up being converted to integers and compared.
n $b == $cbecause both $band$care converted to integers and compared.
n However,$a != $cbecause both $aand$care strings, and when they are compared as strings,
 they are decidedly different.

In his commentary on this example, Dan compared this to the ==andeqoperators in
Perl, which are both transitive.They are both transitive, though, because they are both
typed comparison.==in Perl coerces both operands into numbers before performing the
comparison, whereas eqcoerces both operands into strings.The PHP ==is not a typed
comparator, though, and it coerces variables only if they are not of the same active type.
Thus the lack of transitivity.