I need to split a PHP array into an array containing text and URLs. For instance, assuming
$string = "Hello, my name is http://www.audio.com/1234.mp3/. Today is https://radio.org/weather.wav";
The expected output should be something like:
$a[0] = "Hello, my name is";
$a[1] = "http://www.audio.com/1234.mp3/";
$a[2] = ". Today is";
$a[3] = "https://radio.org/weather.wav";
Any suggestions?
Thanks in advance,
Leo