Welcome Guest, Not a member yet? Register   Sign In
There's a dollar(sign) in variable name
#1

Is that possible to get the data when their is a dollar(sign) in variable.

Example:

my column name is price_in_u$
** this is the column name in my database

then i use model and controller to query and get data ( i have no problem here)

this is my code when i display the data
**
PHP Code:
echo 'Price in US: ' $comp_prod->prince_in_u

the error i got is:
syntax error, unexpected '$', expecting ',' or ';'

is there a way i can use the dollar(sign) ?

even escaping the string is not working.
PHP Code:
echo 'Price in US: ' $comp_prod->prince_in_u/$ 
Reply


Messages In This Thread
There's a dollar(sign) in variable name - by rhyszz - 09-09-2015, 08:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB