Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Guyz
I am fairly new to PHP and i am trying to run this scriptCode: Select all
<?php
// Start with an arbitrary number of sales
$bootsSold = 1672;
$boardsSold = 312;
$bindingsSold = 82;
// Reflect new sales
srand((double)microtime() * 1000000);
$bootsSold = $bootsSold + rand(0,10);
$boardsSold = $boardsSold + rand(0,5);
$bindingsSold = $bindingsSold + rand(0,3);
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
?>
<totals>
<boards-sold><? echo $boardsSold; ?></boards-sold>
<boots-sold><? echo $bootsSold; ?></boots-sold>
<bindings-sold><? echo $bindingsSold; ?></bindings-sold>
</totals>But the <? echo $boardsSold; ?> ,<? echo $bootsSold; ?>,<? echo $bindingsSold; ?> are not getting resolved and when i get back the response i get a not well formed error.....
Why is PHP not able to resolve the echo tags....!!!
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]