So I want to add the element and expand the array by one. Is this close?$newelement = 54; for $i (5..($last + 1)) { $temp = $a[$i]; $a[$i] = $newelement; $newelement = $a[($i+1)]; }
update (broquaint): title change (was adding to the middle of a array)
In reply to adding to the middle of a array by stu96art
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |