answersLogoWhite

0

$array1 = array("Matt","Michael","Justin");
$array2 = array("Janice","Janet","Kylie");

array_splice($array1,2,0$array2);


We take $array2 and add it to $array1 at location 2 starting at the 0 position of $array2.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

Name two smaller arrays you can use to find the product of 8x6?

name two smaller arrays you can use to find the product


What do you call a number that can be arranged in more than two arrays?

composite


How can you use arrays to show breaking apart to find the product of 18 and 12?

To use arrays to show breaking apart for the product of 18 and 12, you can first decompose one of the numbers, such as 12, into smaller, more manageable parts, like 10 and 2. Then, create two separate arrays: one with 18 rows and 10 columns, and another with 18 rows and 2 columns. By calculating the area of each array (18 × 10 = 180 and 18 × 2 = 36) and then adding the two products together (180 + 36), you find the total product of 18 and 12, which is 216.


What also called two dimensional arrays are?

I suppose you could refer to a two-dimensional array as a rectangular or square array (or as a jagged array of not all arrays within a given dimension have the same size). Table, grid or matrix may also be good synonyms for two-dimensional array, subject to the problem domain addressed with the algorithm.


Meaing of Associative Array in PHP?

There are two types of arrays, associative arrays, and indexed arrays. Indexed arrays are where you access the items in order, for example $myArray[0] would be the first item in the array, $myArray[1] would be the second item, and so on. You can create an indexed array like this: $myArray = array("item1","item2","item3"); echo $myArray[0]; //item1 echo $myArray[2]; //item3 You can also set your own indexes: $myArray = array(0=>"item1", 1=>"item2", 5=>"number 5"); echo $myArray[0]; //item1 echo $myArray[2]; //null or doesnt exist, i cant remember You can also add items after using the square-brackets. If you include a number, that index is set, otherwise it just adds it to the end of the array. $myArray[9] = "set index 9"; $myArray[] = "add to the end of the array"; Associative arrays use strings instead of numbers. $colors = array("cat"=>"brown", "dog"=>"yellow", "fish"=>"purple"); echo $colors["cat"]; //brown echo $colors["fish"]; //purple And you can add more with the square-brackets again. $colors["camel"] = "green"; To loop through both types of arrays you can use a foreach loop, or to loop through indexed arrays you can get the length into a variable and a do normal for loop.

Related Questions

How do you get difference between two or more arrays in PHP?

The inherit function `array_dif($arrayOne, $arrayTwo, $arrayThree, ...)` is likely what you're looking for. It compares two or more arrays, and returns an array of values that are unique among the arrays.


What is electrical splice?

The joining together of two or more conductors in an electric circuit.


What is a Y- sPLICE?

A splice is usually two rope ends joined together to form a longer rope. A Y splice is three rope ends are joined together to form a Y shape. The same can be said for connecting three electrical or component cables.


What are the Disadvantages of fiber optic cable?

It's very expensive, and difficult to splice two cables together.


What does the term - wire splice - mean?

A wire splice is the joining of two or more wires together. Commonly this is done with an approved wire joining nut. All slices are to be made in junction boxes to prevent fire should the wire splice become unserviceable.


What is a Britannia splice?

A Britannia splice is a type of rope splice used in sailing to join two ropes together. It is a simple and secure way to create a strong connection between two ropes by intertwining their strands. This type of splice is commonly used in nautical applications where a reliable connection is essential.


Given two arrays A and B Array?

distinguish extra element in two arrays


How do get white kuyrum in Pokemon white 2?

Get Kyurem, dna splicer. trade for a reshiram and splice the two together


How do you find the difference between two arrays in Java?

for arrays you can list the different arrays and what attributes that you give to them.


How can I connect two steel cables together?

To connect two steel cables together, you can use a cable clamp or a cable splice. A cable clamp is a metal device that wraps around the two cables and is secured with bolts or screws. A cable splice involves cutting the ends of the cables and joining them together using a specialized connector. Both methods provide a strong and secure connection for the steel cables.


How can you spot a comma splice?

If it is possible to replace a comma in a given sentence with a period, and wind up with two sentences that are each complete and that make sense as sentences, then the comma that you replaced was being used to splice together two sentences. This is generally a bad idea.


What are the rules of comma splice?

A comma splice joins two independent clauses - a no-no. An independent clause is one that can stand alone as a sentence. When two independent clauses are next to each other, you have only two choices: you can either join them, or you can separate them. you can join them with a coordinator word, such as but, if, therefore. You can separate them with end-point punctuation (;, - )