ballhogjoni Posted April 26, 2007 Share Posted April 26, 2007 I am coming up with this error for this line of code: Parse error: syntax error, unexpected '.', expecting ')' in /home/realfina/public_html/tests/leads.php on line 167 function redirect($filename="http://\"".$_SERVER['PHP_SELF']."?page=$next\"", $delay="0", $die="0"){ Link to comment https://forums.phpfreaks.com/topic/48845-solved-syntax-error/ Share on other sites More sharing options...
per1os Posted April 26, 2007 Share Posted April 26, 2007 In function definitions I do not think you can use concatonation...or $strings for that matter. Instead what I would do a constant variable defintion and use that. IE: <?php $next = 3; define('DEFAULT_REDIRECT', 'HTTP://' . $_SERVER['PHP_SELF'] . '?page=' . $next); function redirect($filename=DEFAULT_REDIRECT, $delay="0", $die="0") { } ?> Link to comment https://forums.phpfreaks.com/topic/48845-solved-syntax-error/#findComment-239390 Share on other sites More sharing options...
ballhogjoni Posted April 26, 2007 Author Share Posted April 26, 2007 thank you Link to comment https://forums.phpfreaks.com/topic/48845-solved-syntax-error/#findComment-239396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.