Jump to content

Parse Error


ShaolinF

Recommended Posts

Hi Guys,

 

I have a function in my class which returns a string link variable. The problem is it keeps giving me a parse error. See code below followed by error message:

 

function get_previouspage_link()
{
if($this->CURRENT_PAGE > 1)
	$previous_page = $this->CURRENT_PAGE - 1;
	return "$_SERVER['REMOTE_URI']?currentpage=$previous_page";
}

 

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\wordpress\wp-content\themes\alburujpress\paginate.php on line 50

LINE 50: return "$_SERVER['REMOTE_URI']?currentpage=$previous_page";

Link to comment
https://forums.phpfreaks.com/topic/183418-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.