Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 06:13 am EDT

Geeklog Forums

Quote Block


Vervayne

Anonymous
I'm a php n00b here, so trying my best to edit this php code so it will call up correctly in my block. What is happening is that its showing in the block, but also at the top of my page above the header. I'm going to paste my code and maybe someone can correct it for me. Razz

Text Formatted Code
function phpblock_quotes()
{
    $externalFile = "N";  // Y means the item array contains file names
    // add to the weight and item arrays below
    $weight[0] = 1; $item[0] = "<p><i>The main problem I have with most other MMOs is that the experience feels like you are on rails against stupid enemies with too much power. This is not a dig at other games at all, believe it or not. It's just that mob AI simply cannot provide the kind of enjoyment and challenge that another human being can. And most other MMOs don't make PvP or RvR an integral part of the experience. It's more as if you have to practice against target dummies for your whole life until you graduate and can then play against other players in a special room set aside for the purpose. The Warhammer MMO is about war, all the way through and all the way up.</i> Lance Robertson, Producer</p>";
    $weight[1] = 1; $item[1] = "<p>test2";
    $weight[2] = 1; $item[2] = "<p>test3";
    // end of arrays
    for ( $a=0; $a<count($weight); $a++ )
    for ( $b=1; $b<=$weight[$a]; $b++ ) $pick[] = $a;
    $selected = $item[$pick[rand(0,count($pick)-1)]];
    if ($externalFile == "Y") $selected = file_get_contents($selected);
    echo $selected;
   
    return $selected;
}
 


 Quote

Vervayne

Anonymous
Actually I removed the echo selected part and its fixed now. o/
 Quote

All times are EDT. The time is now 06:13 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content