In article <006101c1ab7b$27ec01b0$9d0e533e@mazingerz>, [EMAIL PROTECTED] (Borja martín) wrote:
> $img[3]["src"] = "img1"; > $img[6]["src"] = "img2"; > $img[9]["src"] = "img3"; > > and I would like to change the array index adding one to their values,but > only on the two last arrays, so that > I have: > > $img[3]["src"] = "img1"; > $img[7]["src"] = "img2"; > $img[10]["src"] = "img3"; > > the problem using the php functions like array splice to add a new array, is > that the keys are reindexed. unset() the array elements you don't want, assign the ones you do. Ex: $img[10]["src"]=$img[9]["src"]; unset($img[9]["src"]); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]