Hey guys, I'm trying to add X number elements to a certain spot in an array using array_splice() but for some reason, the function keeps causing my script to hang (firefox just reports that it's waiting for the server).
So, the code looks like this:
<?php for($c=0; $c<$tabsplit_parts[1]; $c++) {
$newelements_array[] = $tabsplit_parts[0]; // Creates an array of the same element over and over
}
array_splice($first_step_kws, $i, 0, $newelements_array); // Inserts that array into the other array at point $i ?>
When I comment out the array_splice line, everything loads fine. But if the line is left intact, the page refuses to load.
Any ideas?
Oh yeah - I'm using PHP v4.2.2