Here's the array i have , and i wanted to modify it the way i needed.
Array
(
[0] => Array
(
[0] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593151
)
)
[1] => Array
(
[0] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593194
)
)
[2] => Array
(
[0] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593249
)
[1] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593250
)
[2] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593257
)
[3] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593282
)
[4] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593286
)
)
[3] => Array
(
[0] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593303
)
[1] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593308
)
[2] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593309
)
[3] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593309
)
)
)
i need the above array parents to remove , and the child values saved, like this one :
Array
(
[0] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593151
)
[1] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593194
)
[2] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593249
)
[3] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593303
)
[4] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593308
)
[5] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593309
)
[6] => Array
(
[ip] => 127.0.0.1
[php_session] => d9r2qfeiheo0gfklcq7vbj9nq7
[timestamp] => 1402593309
)
)
after this , i want to modify the result array to remove any key that have the same ip
and php_session value. any ideas out there ?
RecursiveIteratorIteratorfunction , but still not doing exact what i wanted.