Thread: Wrong output
View Single Post
Old 05-22-2009, 03:30 AM   #1 (permalink)
9three
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default Wrong output

Hey,

I'm trying to output only whats within the quotes ""

PHP Code:
$this->pc file_get_contents('http://www.url.com'FALSENULL0140);
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 :)
9three is offline  
Reply With Quote