pushing array index
| From: | Borja Martín | Date: | Fri, 01 Feb 2002 23:49:57 +0000 |
| Subject: | pushing array index | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83214@lists.php.net to get a copy of this message | ||
hi, i have the following array:
$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.
thx in advance