English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

$OMFG = 54800;
$PrismButterflyMantilla = 17050;
$G9Laptop = 13495;
$Gbot = "Unknown";
$Angelbow = 14000;
$AncientKatana = 23000;
$ORLYHat = 7700;
$Gweethedragon = 8950;
echo '' . $OMFG . '';
echo '' . $PrismButterflyMantilla . '';
echo '' . $G9Laptop . '';
echo '' . $Gbot . '';
echo '' . $Angelbow . '';
echo '' . $AncientKatana . '';
echo '' . $ORLYHat . '';
echo '' . $Gweethedragon . '';
echo "";
echo "";
echo '

I have ';
echo "$OMFG + $PrismButterflyMantilla + $G9Laptop + $Angelbow + $AncientKatana + $ORLYHat + $Gweethedragon";
echo " gold worth in items
";
echo '";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "
Pure Gold: 16000";
?>

preview: http://zacgorak.5gigs.com/gaiastat.php

2006-10-07 10:58:41 · 2 answers · asked by z!p 1 in Computers & Internet Programming & Design

$OMFG = 54800;
$PrismButterflyMantilla = 17050;
$G9Laptop = 13495;
$Gbot = "Unknown";
$Angelbow = 14000;
$AncientKatana = 23000;
$ORLYHat = 7700;
$Gweethedragon = 8950;
echo "

" . $OMFG . "" . $PrismButterflyMantilla . "" . $G9Laptop . "$Gbot" . $Angelbow . "" . $AncientKatana . "" . $ORLYHat . "" . $Gweethedragon . "
";
echo "
I have $OMFG + $PrismButterflyMantilla + $G9Laptop + $Angelbow + $AncientKatana + $ORLYHat + $Gweethedragon gold worth in items
";
echo '
Pure Gold: 16000';
?>

It does not add correctly.

2006-10-07 11:52:56 · update #1

2 answers

replace the "(double quote) at the end of last line by ' (single quote). Use either a matching pair of '' (single quote) or a matching pair of "" (double quote) to enclose a string.

So do this

replace this
echo '

Pure Gold: 16000";

with this
echo '
Pure Gold: 16000';

Hope it helps :).

2006-10-07 11:09:10 · answer #1 · answered by fsm 3 · 0 0

instead of echo '

'
do
echo "td class=\"even\">";
will definitely work.

currently working on 3 websites using php mysql ajax javascript dom css

Also it looks to me like you are very new to php, the code that you have written is very messy, please try and make your own coding standard first and then start writing the script. I can see this mistake on the last like too:
echo '
Pure Gold: 16000";
?>
You've got a single quote at start and double quote at then end.

2006-10-07 11:06:50 · answer #2 · answered by Manish 5 · 0 0

fedest.com, questions and answers