Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~316 People Reached
Favorite Forums
Favorite Tags
php x 10
Member Avatar for avukadomusic

this is my code: [code=php]<?php $url = 'http://www.zap.co.il/model.aspx?modelid=35860' ; $str = file_get_contents($url); preg_match_all('/([₪])* (\d+(:?.\d+)?)/', $str, $matches, PREG_SET_ORDER); $i=0; foreach ($matches as $val) { if($i==0) $first=$val[2] ; if($i==3) $second=$val[2] ; $i++; } $bad_symbols = array(",", "."); $first = str_replace($bad_symbols, "", $first); $bad_symbols = array(",", "."); $second = str_replace($bad_symbols, "", $second); echo …

0
50
Member Avatar for avukadomusic

[code=php]$url = 'the web address I want to get the first and second numbers close to $' ; $str = file_get_contents($url); preg_match_all('/ ([$]) *(\d+(:?.\d+)?)/', $str, $matches, PREG_SET_ORDER); $i=0; foreach ($matches as $val) { if($i==0) $first=$val[2] ; if($i==3) $second=$val[2] ; $i++; } $bad_symbols = array(",", "."); $first = str_replace($bad_symbols, "", $first); …

Member Avatar for avukadomusic
0
162
Member Avatar for avukadomusic

here is my code with problems: [code=php]$url = 'somesite/somepage'; $str = file_get_contents($url); preg_match('/\w(\d*).*?\$/',$str,$matches); print_r($matches[0]);[/code] the goal is to type in any webpage and get its source code into $str and then find the first appearance of the symbol $ in the string and return only the number closest to that …

Member Avatar for digital-ether
0
104