djeyewater Posted April 26, 2007 Share Posted April 26, 2007 Sorry if this is a stupid question, but I'm a PHP Noob. I am trying to use a PHP variable inside of some javascript, it works okay but a Question mark appears at the top of the page. The relevant code looks like: <?php $path= "./Marchants_Road_-_Cuckfield_Road/"; ?> <!-- Pano // --> <DIV ID="Smallpano" Name="Smallpano"> <SCRIPT type="text/javascript" src="../Scripts/detectvr.js"></SCRIPT> <SCRIPT type="text/javascript"> writecode("<?php echo $path; ?>Small.mov","<?php echo $path; ?>Small.mov","<?php echo $path; ?>SmallJava.jpg","<?php echo $path; ?>SmallFlash.swf","<?php echo $path; ?>SmallSPIV.jpg","100%","100%");</SCRIPT> </DIV> When I view source on the HTML page output, the top looks like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">? <!-- saved from url=(0013)about:internet --> <html><head> All the code for the page is correct except that ? at the end of the first line. What am I doing wrong? Link to comment https://forums.phpfreaks.com/topic/48764-question-mark-appearing-on-page-when-php-parsed/ Share on other sites More sharing options...
mpharo Posted April 26, 2007 Share Posted April 26, 2007 that code looks find, can you post the whole page? Link to comment https://forums.phpfreaks.com/topic/48764-question-mark-appearing-on-page-when-php-parsed/#findComment-239010 Share on other sites More sharing options...
djeyewater Posted May 2, 2007 Author Share Posted May 2, 2007 Hi The code was fine actually - somehow I had managed to type that Question mark in the PHP code. Sorry for wasting your time. Link to comment https://forums.phpfreaks.com/topic/48764-question-mark-appearing-on-page-when-php-parsed/#findComment-243350 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.