title: Can i use php inside php
body: <p>I'm trying to redirect to a paypal checkout page but it is taking me to the paypal start page. I am using php inside the Header url to specify some variables but the url cutts of where the php starts.
  Here is the code:</p>
  
  <pre><code>header("location: http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=XXXX
         &amp;lc=UK&amp;item_name=test&amp;amount=&lt;? echo $xprice1; ?&gt;
         &amp;currency_code=GBP&amp;button_subtype=services&amp;no_note=0
         &amp;bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHostedGuest";")
  </code></pre>
  
  <p>I think I would be able to fix this by inputing this into mysql and then output it to the header but that would probably be an unnecessary way to go. so if anyone would have a better solution I would be happy to get some response. The variable is getting its value from a txt file with <code>file_get_contents()</code></p>