I've an associative array titled $data
as follows:
Array
(
[0] => Array
(
[student_image] => <img src="http://34.144.40.142/file/pic/photo/2015/02/02ff1a23db112db834b8f41748242bcb_240.png" alt="" width="180" height="160" class="photo_holder" />
)
[1] => Array
(
[student_image] => <img src="http://34.144.40.142/theme/frontend/foxplus/style/default/image/document/docx.png" alt="" />
)
[2] => Array
(
[student_image] => <img src="http://34.144.40.142/file/pic/photo/2015/02/da46580276da5c3a31b75e8b31d35ddf_240.png" alt="" width="180" height="160" class="photo_holder" />
)
)
The actual array is very huge, here I've put in only the necessary data from array.
Now what I want is for every element of the array the key [student_image]
I should get only the URL of the image, no imag tag and any other data. In short I want following output of above array:
Array
(
[0] => Array
(
[student_image] => http://34.144.40.142/file/pic/photo/2015/02/02ff1a23db112db834b8f41748242bcb_240.png
)
[1] => Array
(
[student_image] => http://34.144.40.142/theme/frontend/foxplus/style/default/image/document/docx.png"
)
[2] => Array
(
[student_image] => http://34.144.40.142/file/pic/photo/2015/02/da46580276da5c3a31b75e8b31d35ddf_240.png
)
)
How should I achieve this in best possible and optimum way for all the elements of an array $data
?
Thanks in advance.