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:

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

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

Reading waves
Hi,

I am trying to find a way of finding the highs and lows on a graph line, the line points

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.

we have to suppl

rookie looking for help coding a CSS form with PHP
I'm trying to figure out how to add PHP code to my xhtml form so that it is a working form embedded

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

Error in SQL Syntax HELP!!!
I have this page:

Code: <?php

session_start();

//connect to server and s

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

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