Parse Error


Posted on 16th Feb 2014 07:03 pm by admin

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:

Did you know?Explore Trending and Topic pages for more stories like this.
Code: function get_previouspage_link()
{
if($this->CURRENT_PAGE > 1)
$previous_page = $this->CURRENT_PAGE - 1;
return "$_SERVER['REMOTE_URI']?currentpage=$previous_page";
}
Code: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:wampwwwwordpresswp-contentthemesalburujpresspaginate.php on line 50

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

Your Answer:

Login to answer
326 Like 10 Dislike
Previous forums Next forums
Other forums

Send current URL in URL with a $_GET variable problem.
Hello community,

I have created a function that gets the current variable of a page, example:

php file erros / need help please
Hello

Someone decoded a zend file for me.. after uploaded it on ftp i get some errors, i trye

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccur

Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and ov

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash