I have a javascript button on my site that is supposed to popup a URL at random from an external txt file of urls (one per line) but the php keeps messing up the javascript by inserting an extra break.
<a href="#" onClick="javascript:window.open('http://something.com/a.php?u=<?php echo $url ?>', 'yea', 'height=520, width=400, location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar = yes, toolbar=no');"><img src="clic.jpg" border="0"></a>
<?php
$urls = @file('urls.txt');
$num = count($urls)-1;
$url = $urls[rand(0,$num)];
?>
;on your first<?php echo ... ?>;can be omittedechoing$urlbefore you assign a value to it.