-
Prospect
cegonsoft reviews | PHP in_array()
PHP in_array()
The in_array() function is used to check whether a value exists in an array or not.
Syntax: in_array(search,array,type)
search - Value to search in the array.May contain multiple values.
array - Specifies the array to search.
type - If it is set to true, the function checks the type of the search_value.
Example:
<?php
$numbers = array(10,20,30,40,50,33);
if (in_array(33, $numbers))
{
echo “item found in the array”;
}
else
{
echo “item not found in the array”;
?>
Sometime it is very important to know that, the value we want to execute is available in our array or not. Using in_array() function we can solve this problem.
Visit: Cegonsoft
-
Prospect
An array is a way of holding multiple closely-related values, such as the test scores of all students in a class. An array is made up of a key and a value, and the key points to the value.
There are two types of arrays: Indexed array and Associative array. Their difference is in the way the key is specified. Let's look at both of them:
Indexed Array
In an indexed array, the keys are numeric and starts with 0, and the values can be any data type. The following shows two ways of assigning values to an indexed array:
$friends = array("Sophie","Stella","Alice");
This is equivalent to the following:
$friends[0] = "Sophie";
$friends[1] = "Stella";
$friends[2] = "Alice";
Associative Array
In an associative array, the keys are not necessarily numeric, and even when they are numeric, not necessarily in any order. So, when you are putting data into an associative array, you'll need to make sure you specify both the key and the value:
$student_score = array("John"=>80, "Matt"=>90, "May"=>85);
This is equivalent to the following:
$student_score["John"] = 80;
$student_score["Matt"] = 90;
$student_score["May"] = 85;
Multidimensional Array
The arrays in the examples above are 1-dimensional. However, there will be times when multidimensional arrays are desired. What's a multidimensional array? That's when you have arrays of arrays. Let's look at an example below:
$array1 = array (10,15,20);
$array2 = array (110,115,120);
$array3 = array (210,215,220);
$big_array = array ($array1, $array2, $array3);
$big_array is now a 2-dimensional array. For example, if you have the following output code:
print {$big_array[1,2]};
The Output will be:2
cegonsoft
-
Prospect
cegonsoft reviews | CSE ECE IT Freshers | final year projects in Cegonsoft
The meaning of a final project
Many students begin their projects to talk about writing a “report” at the end of his “project” and do some “research” as part of its review of the literature. This is where the subtleties of the English language, tend to cause much confusion. “Research” can have many different meanings, and to complete a very successful project last year, the first thing to do to understand fully what is expected of you in an academic context. Even if your senior year is the last experience with academic work, remember that your work will be evaluated on academic criteria and universities have very different objectives for the industry.
So to clarify: the research, the academic context, is to add something new to the body of information that people have collected their own area of interest. Size of the project is a piece of research, because you are going to create something new that has not been created before. Just depends on what field you are studying. It could be a new perspective on the brochure, a new proof of a sentence, a new application of a particular technology or something else. Since I’m still a student, it is likely (but not necessary) that your work is a small step forward. It ‘is unlikely to produce something totally revolutionary, so do not be intimidated, that your work is novel. That said, it may be that it produces a great job and your boss might want to do this will be a technical report or presentation with you, what would be a great resume (or resume).
-
Prospect
Good array very simple and easy.i like it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules