Jump to content

Recommended Posts

Hi, in my class there is a member variable whose default value contains a "$" character in it.. like

private $name = "rohith$kodakandla"; 

 

if I use code like this, I am getting an "Unexpected '"' at line..." kind of error. I think the php is taking varible $name as rohith+ value of ( $kodakandla).. i tried removing $ () and It worked perfectly without error. but I want the $name to be "rohith$kodakandla"

 

can someone help me to fix this?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/207508-variable-values-containin/
Share on other sites

thanks a lot barand and bh..

 

is this double quotes issue version dependent? the reason I am asking is, I came across this issue when debugging an old application that is no longer in use.. i am not sure which version of php they had.. but the current version I am using is 5.1.2

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.