I am working on an indexing proj. its all fine up until when i have to udate the index file. i want whe a website is deleted by the admin, all its index posting lists should be deleted. please help by pointing me to the write way of removing an array from a mutlt dimensional array.
given an array like bellow, 3 is the id of the indexed website in the database. the admin deletes that website. I want also to be able to remove its posting references from my index.
Array
(
[mr] => Array
(
[3] => Array
(
[frequency] => 3
[position] => Array
(
[0] => 16
[1] => 94
[2] => 110
)
)
)
[smith] => Array
(
[3] => Array
(
[frequency] => 3
[position] => Array
(
[0] => 17
[1] => 95
[2] => 111
)
)
)
)
lets call that array $index. How can someone unset or delet all arrays that have a key of 3. meaning that i will be left with an array like this.
Array
(
[mr] => Array
(
)
[smith] => Array
(
)
)