Hay guys i need help on a regex.
I’m using file_get_contents() to get the source of a page, i want to then loop through the source and find all the and extract all the HREF values into an array.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should better use a real parser like SimpleXML or DOMDocument than regular expressions. Here’s an example with DOMDocument that will give you an array of
Aelements: