I have such a string,
$ inp1 = "3 in quantity [0,0], 1-2 and 6 months [6,1] [3,2]) ";
In this internally, going to take the values of square bracket. How can I take this class in the square category?
[0,0] [6,1] [3,2]
Thanks in advance for this help.
preg_match_all ('/ \ [\ d +, \ d + \] /', $ Inp1, $ matches); $ Result = implode ('', $ matches [0]);
Comments
Post a Comment