InterviewSolution
Saved Bookmarks
| 1. |
How to get string between two characters in php? |
|
Answer» Suppose we have a $string = “[Hello there I’m=testing]” And we want to EXTRACT the string placed between the characters between = and ]. Here’s how to do it using PHP string functions: EXAMPLE$str = "[Hello there I’m=testing]"; ECHO getStringBetween($str,$from,$to); FUNCTION getStringBetween($str,$from,$to) Output: |
|