Answer the question
In order to leave comments, you need to log in
PHP preg_match not working when reading text from excel?
It is necessary to extract the link from the text. This text is read from the excel file and is in the $data[$c] variable, more precisely in the $data[$c] string;.
The code is like this:
preg_match('/http(.*)/i', $data[$c], $link); //регулярное выражение максимально упростил
echo '$link:';
print_r($link);
$str = strval($data[$c]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question