How to multiple value from file_get_contents php with a number using php? -


how multiple value file_get_contents php number using php ?

when run test.php result 0

in case want 31.597 33.2600 * 0.95

how can ?

test.php 

.

<?php $html = file_get_contents('https://www.example.com'); $doc = new domdocument(); libxml_use_internal_errors(true); $doc->loadhtml($html); $finder = new domxpath($doc); $node = $finder->query("//*[contains(@class, 'bld')]"); $xxx  = $doc->savehtml($node->item(0)); $xxx = str_replace(" ","",$xxx ); $xxx = str_replace("star","",$xxx ); $xxx = $xxx * 0.95; echo $xxx ; ?> 

and code https://www.example.com

<span class="bld">33.2600 star</span> 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -