Why is this only happening once? (PHP)?

mnpeep

New member
I made a function, but it only appears once, (not ten times).

I tried this also with a for loop, but with no avail.

Code:

function GetRecentPlugins(){
$stringbuilder = "";
$total = file_get_contents("http://bukget.org/api/json/latest");
$total = substr($total, strpos($total,"[")+1);
$temp = 0;
while($temp < 10){
$plugin = "";
if($temp == 0){
$plugin = substr($total,0,strpos($total, "},"));
}else{
$plugin = substr($total,strposnth($total, ")}",($temp -1)),strposnth($total, ")}",($temp)));
}
$stringbuilder = $stringbuilder . "<tr><td>".Getname($plugin)."</td><td>".Getdescription($plugin)."</td><td>".GetVersion($plugin)."</td><td>".GetCB($plugin)."</td><td><a target=\"_new\" href=\"".GetBDLink($plugin)."\"><input type=\"image\" src=\"images/icn_jump_back.png\" title=\"Go to BukkitDev\"></a></td></tr>";
$total = substr($total,strpos($total, "},"));
$temp += 1;
}
return $stringbuilder;
}
 
Back
Top