Hey, i have an array and i want to remove an element from it. I've currently been using 'for' loops that will miss out the element i want to remove, for example:
$exploded = explode(",", $sesh);
for ($i=0; $i<$arraynumber; $i++) {
$sess1 .= $exploded[$i].",";
}
for ($i=$arraynumber+1; $i=$inarray-1; $i++) {
$sess2 .= $exploded[$i].",";
}
$finalsess = $sess1.$sess2;
$finalsesh = substr_replace($finalsess, "", -1);
$arraynumber is the position of the element i want to remove. So if $arraynumber is 0 then i want the 1st elemnt removed.. if $arraynumber is 5, i want the 6th element removed.
This isnt working though so i was wondering if theres another way to do it?
Cheers a bunch, BIOSTALL