Jump to content

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /a/pag


csplrj

Recommended Posts

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /a/page1.php on line 121

 

I am getting the above error

 

I have used & operator to pass the value by refrence. This works in PHP 5 but not in 4.4.2. Is that & operator is not availabe in PHP 4.4.2?

 

Thanks in advance

 

CSJakharia

Link to comment
Share on other sites

The code is

 

foreach($row as &$value)

 

 

This works on PHP 5 but not on PHP 4.4.2

 

Bye for now

 

CSJakharia

 

It's not available in 4.4.2.

 

As of PHP 5, you can easily modify array's elements by preceding $value with &. This will assign reference instead of copying the value.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.