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

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

"SEO" URLs
Hey, I'm wondering how to go about creating and using these types of URLs. I'm presuming it's PHP th

Update data to upper case in parent/child tables
Hi Gurus!

In production we have a product table and which is being reference by many tabl

Pipe email to PHP - get mail adress from MySQL - send?
Hi all,

this is the challenge:

1) Our faculty at the college where I'm employed includ

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

Variables and Include
Code: [Select]<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['b

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

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