Include into url

Hi

I am trying to include the code xta into this below url, it works with other parts on the page, but there is something to do with this URL that appears to stop it working. Would anyone be able to tell me why xta does not get inserted where the <?=$code?> is?

<?php $code = "xta"; ?>

$data = processStockSite(‘http://finance.yahoo.com/q?s=<?=$code?>.l’);

Thanks in advance

Hi there,

Try changing it to the following:
[php]$data = processStockSite(‘http://finance.yahoo.com/q?s=’.$code);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service