0
Hello I’m having difficulties in mounting the regular expression, and the function returns me 3 positions in the array all empty;
preg_match_all('/<a data-role\="sku\" data-sku-id\="'.$the_new_id[2].'\" id\="sku\-3\-'.$the_new_id[2].'\" href\="javascript:void(0)\">(.*)<\a>/i', $page_content, $sku_3_a);
array(3) {
[0]=>
array(0) {
}
[1]=>
array(0) {
}
[2]=>
array(0) {
}
What is the string that you are using? What parts of string you want to capture?
– Valdeir Psr
The value inside the <a> tag: <the data-role="sku" data-sku-id="201301155" id="sku-3-201301155" href="javascript:void(0)"><span>32cm</span></a>
– Fernando Santana
it seems that counted by the amount of items that is on the site, but did not return the content.
– Fernando Santana