Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help on exploding array\'s and returning the total explained here. Write

ID: 3539273 • Letter: I

Question

I need help on exploding array's and returning the total explained here. Write a function named "dataAnalysis" that accepts 3 parameters. The functions is called "dataAnalysis.


There are three parameters:


1 = a delimiter


2 = data to be exploded into a 1st array using parameter #1 as the delimiter


3 = data to be exploded into a 2nd array using parameter #1 as the delimiter


Return the total of all values in the 2nd array for each parallel item in the 1st array where the value is: big.


My code that does not work:


Maybe not the foreach loop at all but a different way of getting it?


<?php


function dataAnalysis($p1,$p2,$p3) {


// explode the arrays


$myarray=explode($p1,$p2);


$myarray2=explode($p1,$p3);


foreach ($myarray as $val) {

echo "$value<br>";


};


};


echo "exploded array = ".dataAnalysis('^','2^2^2','2');


?>

Explanation / Answer

No answer text found in this record.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote