Jump to content
Sign in to follow this  
Tpojka

Moze li jednostavnije?

Recommended Posts

Pokusavam da uzmem EUR/KN ratu.

Pitam se da li koristim previse funkcija,

odnosno da li se moze u tom pogledu racionalizovati kod:

 

$html = file_get_contents('http://www.hnb.hr/tecajn/hvazeca.htm');

$row = explode('978 EUR', $html);
$row = explode('Poljska', $row[1]);
$eur = $row[0];
$eur = preg_replace('/\s+/', '', $eur);
$eur = substr($eur, 1);
$eur = chunk_split($eur, 8, "\r\n");
$eur = explode("\r\n", $eur);
array_pop($eur);
echo '<pre>', var_dump($eur);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...