Showing posts with label array in php. Show all posts
Showing posts with label array in php. Show all posts

Friday, August 5, 2011

How to change the width of dropdown list in HTML,PHP,JAVA,DOT NET

Let us assume the drop down list is this one:--



<select name="drop-list" style="width: 200px;">
<option> First value <option>
<option> second value <option>
<option> third value <option>
<option> fourth value <option>
<option> fifth value <option>
<select>
 output is :




It is very simple just do this way:

------------------------------------------------------------------------------------

Now see the large width Drop down List


Type the following code:

<select name="drop-list" style="width: 400px;">
<option> First value <option>
<option> second value <option>
<option> third value <option>
<option> fourth value <option>
<option> fifth value <option>
<select>


see the output:

Tuesday, August 2, 2011

Php Array types

Array is a datatype in php...

It is mostly used to store multiple item under a single variable name.

Types of array in PHP:

1.Numeric or Index array.
2.Associative array.
3.Multi-dimensional array.



1. Numeric array:

syntax to create this:

php code begin here


/*
  #Write a program to Numeric array in PHP
 #comment: make a array variable name $var
 #Author : amit sharma
 */


$var = array (value1,value2,value3...);

#in detail

$var = array(10,20,30,40,50,60);

now in above line we create a array name $var in php that store 6 values 10,20,30,40,50 and 60 .

php code end here