Welcome Guest, Not a member yet? Register   Sign In
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in
#1

[eluser]Uresh Patel[/eluser]
Hi,
I am running same code over my sub domain and localhost successfully .
<Sub domain link : http://estate.alakmalak.net/list.php >

And i have upload it on another server it gives me such error.

Parse error: syntax error, unexpected ‘&’, expecting T_VARIABLE or ‘$’.....

<original link : http://www.theeverafterestate.com/secure/list.php >

Can anyone help why this error occur ?

[email protected]
#2

[eluser]Abu Ghadeer[/eluser]
Hi there,
can you please post the code that gives you the error so that we can help you?

regards
#3

[eluser]Uresh Patel[/eluser]
Code:
function get_email_template($email_type,$language_id="1") {
    global $db4;
    $db4=new Database();    
    $db4->open();
    if ($email_type=="") return false;
    $sql="SELECT id,subject,body FROM "._DB_PREFIX."emails WHERE email_type='".$email_type."' AND language_id='".$language_id."'";
    
    $db4->query($sql);
    if ($db4->numRows()==1) {
        $result=$db4->fetchAssoc();
        foreach ($result as $key => &$value) {
            $value=stripslashes($value);
        }
        return $result;
    } else {
        return false;
    }
}

this is the function
#4

[eluser]saidai jagan[/eluser]
y u put this ?
Code:
foreach ($result as $key => &$value)
#5

[eluser]Uresh Patel[/eluser]
dear on this line the main error shows on "&"
#6

[eluser]saidai jagan[/eluser]
remove the & in
Code:
foreach ($result as $key => &$value)




Theme © iAndrew 2016 - Forum software by © MyBB