I have an array like this:
Array
(
[0] => "<one@one.com>"
[1] => "<two@two.co.in>"
[2] => "<three@hello.co.in>"
)
Now I want to remove "<" and ">" from above array so that it look like
Array
(
[0] => "one@one.com"
[1] => "two@two.co.in"
[2] => "three@hello.co.in"
)
How to do this in php? Please help me out.
I’m using array_filter(); is there any easier way to do that except array_filter()?
You could take an array_walk on it:
Note however that this will also remove starting
>and trailing<which may not be what you want.