I have an output like this:
Array
(
[0] => stdClass Object
(
[post] => john Has site <a href='http://www.mysite.com/events/info/4240'>this is a test</a>
[date_created] => 1341853220
)
[1] => stdClass Object
(
[post] => jane Has site <a href='http://www.mysite.com/events/info/1'>test venue</a>
[date_created] => 1341849999
)
[2] => stdClass Object
(
[post] => james Has site <a href='http://www.mysite.com/events/info/4240'>this is a test</a>
[date_created] => 1341680695
)
I want to know if there is any way to get result like this:
Array
(
[0] => stdClass Object
(
[post] => john Has site this is a test
[number] => 4240
[date_created] => 1341853220
)
[1] => stdClass Object
(
[post] => jane Has site test venue
[number] => 1
[date_created] => 1341849999
)
[2] => stdClass Object
(
[post] => james Has site this is a test
[number] => 4240
[date_created] => 1341680695
)
what I want is to eliminate the html tags along with the url and just keep the name and the number at the end of the url so that i can store it and use it later. I was trying to use str_replace inside a foreach but I cant find the right way to do it or is there another way to accomplish this?
thanks