How can I get from http://server.com/edf/ghj in php?
I tried
$foo = '<iframe src="http://server.com/edf/ghj" scrolling=no></iframe>';
preg_match('src=\"(.*?)\"',$foo,$m);
preg_match is returning false
and $m is returning null
.
How can I get from http://server.com/edf/ghj in php?
I tried
$foo = '<iframe src="http://server.com/edf/ghj" scrolling=no></iframe>';
preg_match('src=\"(.*?)\"',$foo,$m);
preg_match is returning false
and $m is returning null
.
Easy as @Wrikken said (and Mark-b corrected).
Just added delimiters to pattern: '~src=\"(.*?)\"~'