05-22-2009, 03:30 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Oct 2008
Posts: 75
Thanks: 4
|
Wrong output
Hey,
I'm trying to output only whats within the quotes ""
PHP Code:
$this->pc = file_get_contents('http://www.url.com', FALSE, NULL, 0, 140); preg_match('~currentPage="(.+?)"~is', $this->pc, $this->pc_start); $PcStart = str_replace('~currentPage="(.+?)"~is', '(.+?)', $this->pc_start[0]); echo $PcStart;
When I echo it, it shows currentPage="1". It should only show the integer(int can be anywhere from 1 - 4,000). I'm not good with reg ex though.
Any help? thanks :)
|
|
|
|