請原諒我,因爲我是一位新手程序員。我如何在PHP中將生成的$ matches(preg_match)值與第一個字符剝離到另一個變量($ funded)中?你可以看到我有什麼:如何將preg_match_all變量賦值給有價值的
<?php
$content = file_get_contents("https://join.app.net");
//echo $content;
preg_match_all ("/<div class=\"stat-number\">([^`]*?)<\/div>/", $content, $matches);
//testing the array $matches
//echo sprintf('<pre>%s</pre>', print_r($matches, true));
$funded = $matches[0][1];
echo substr($funded, 1);
?>
我不確定你在問什麼。如果您提供一些樣本輸入和樣本所需輸出,它可能會有所幫助。 – Trott 2012-08-11 01:35:22