I have an array of values that I am trying to output to a string using the following code:
$arrayINS = explode(", ", $arraystring);
foreach ($arrayINS as &$array1INS) {
$array1INS = "(" . $arrayINS . ", 'Some Text Here')";
}
$arrayvaluesINS = implode(', ', $arrayINS);
Now, let's say that the $arraystring = 25145, 25064, 24812
. I would expect echo $arrayvaluesINS
to be
(25145, 'Some text here'), (25064, 'Some text here'), (24812, 'Some text here')
But instead what I get is:
(Array, 'Some text here'), (Array, 'Some text here'), (Array, 'Some text here')
What am I doing wrong?