A variable is a storage area holding a number or text.The problem is,a variable will hold only one value.
An array is a special variable,which can store multiple values in one single variable.
If you have a list of items (a list of car names,for example),storing the cars in single variables could look like this:
$cars1="Saab";
$cars2="Volvo";
$cas3="BMW";
However,what if you want to loop through the cars and find a specific one?And wha if you had not 3 cars,bu 300?
The best solution here is to use an array!
An array can hold all your variable values under a single name.And you can access the values by refferingto the array name.
Each element in the array has its own index so that it can be easily accessed.
In PHP,there are three kinds of arrays:
*Numeric array-An array with a numeric index.
*Associative array-An array each ID key is assaociated with a value.
*Multidimensinal array-An array containing one or more arrays.
An array is a special variable,which can store multiple values in one single variable.
If you have a list of items (a list of car names,for example),storing the cars in single variables could look like this:
$cars1="Saab";
$cars2="Volvo";
$cas3="BMW";
However,what if you want to loop through the cars and find a specific one?And wha if you had not 3 cars,bu 300?
The best solution here is to use an array!
An array can hold all your variable values under a single name.And you can access the values by refferingto the array name.
Each element in the array has its own index so that it can be easily accessed.
In PHP,there are three kinds of arrays:
*Numeric array-An array with a numeric index.
*Associative array-An array each ID key is assaociated with a value.
*Multidimensinal array-An array containing one or more arrays.
Acesoftech is a leading PHP training center which provides best training in Kolkata and Surat. The company provides training in such a way that its easy to learn and complete job oriented. We provide live PHP training.
ReplyDeleteAcesoftech is kolkata’s top PHP training center where professional php training is provided. The training is provided by not by the faculties but professionals who have already worked in this field. PHP is in demand, does that mean that its very easy to find job. And if its like that why there are hundreds of students how are jobless in spite of having knowledge of PHP? The reason is simple, they know php but they does not know it professionally. They have not been trained in proper way .
ReplyDeleteAcesoftech trains in such a way that you can get job instantly because we trains the things which are in demand in the industry.
If you are looking for professional PHP training in Kolkata, acesoftech guarantee you of building your career in PHP
We at W3 web School provide php training in Kolkata. So our training course in oriented for both live classes and also provide Online php training for who want to learn php and mysql from home at their comfort and convenience.
ReplyDeletehttp://www.w3webschool.com/phpmysql/
Call Us:033-64506754
Thanks for providing brief intro to Array.
ReplyDeletephp training in chandigarh
Very nice job.
ReplyDeletefor more visit
PHP training in chandigarh
I really thankful to you for providing intro to array.
ReplyDeletephp training in chandigarh
Acesoftech is a leading PHP training center which provides best training in Kolkata. The company provides training in such a way that its easy to learn and complete job oriented. We provide live PHP training in kolkata.
ReplyDeletehttp://www.acesoftech.in/phpmysql-training/
Thanks
A variable is a storage area holding a number or text.The problem is,a variable will hold only one value.
ReplyDeleteIndustrial Training In Chandigarh
PHP Industrial Training in Chandigarh
It is really interesting for me to read this article. Thanks for it. I like such topics and everything connected to them.
ReplyDeleteweb development company india