Click here to Skip to main content
15,921,697 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I was wondering how to take just what I need from each element of my array in php. I need just the parts between > and < and can delete the rest.

Any help would be much appreciated! Thanks!

Barton
Posted
Comments
Sergey Alexandrovich Kryukov 3-Mar-14 13:09pm    
In a loop, get just the part you need (whatever it is). Any problems?
—SA

1 solution

You should study the php string functions.
strstr($elem,">", true)  - returns part of string before ">"
strstr($elem,"<", false) - returns part of string after "<"

from this point on, you should be able to work it out.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900