php trouble
Posted: Thu Sep 10, 2009 8:01 pm
I keep getting this error:
Parse error: syntax error, unexpected T_VARIABLE in /home/myavatar/public_html/cardtest2.php on line 18
Heres my code:
Parse error: syntax error, unexpected T_VARIABLE in /home/myavatar/public_html/cardtest2.php on line 18
Heres my code:
Code: Select all
<?php
//Script (c) 2009 http://www.gamebattleshq.com
//include into teamcards
//v1.0
//
//Load in DOM Doc
$u = $_GET["u"]
$stats = new DOMDocument();
$stats_xml = $u . "/stats.xml";
$stats->load( $stats_xml );
//
//Assign tags to vars:
$n = "name";
$xp = "xp";
$w = "wins";
$l = "losses";
$s = "streak";
$p = "place";
$wp = "winPercentage";
$mp = "matchesPlayed";
$r = "reputation";
$lv = "level";
//
//Variable loading function:
function get($tag);
{
$i= $stats->getElementsByTagName($tag);
$s = $i->item(0)->nodeValue;
echo $s
}
//Format for entering a stat:
//USE: * <span id="STATNAME"><?php get($stat) ?></span> *
//
//End of Script.
//Script by Alex Kizer.
get("$n");
?>