Getting a part from a string
问题 I am trying to collect all CatIDs from a site...the URL structure is... http://www.abc.com/family/index.jsp?categoryId=12436777 I am interested in it categoryId which is in this case is 12436777 My question is Which is best, Regex or string explode?? if regex, please help me, I am very bad on it.. Also, I have to consider that URLs like http://www.abc.com/product/index.jsp?productId=12282785 I tried $array = explode("http://www.abc.com/family/index.jsp?categoryId=", $loc); foreach ($array as