• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
There's a dollar(sign) in variable name

#4
Something else to consider is that you can alias the column name in your select statement, like this:
PHP Code:
// Although I don't recommend adding '*' in the array, 
// I've done so here because I don't know what else you 
// may be selecting in this query.
$this->db->select(array('price_in_u$ as price_in_us''*'));
// ...
echo "Price in US: {$comp_prod->price_in_us}"
Reply


Messages In This Thread
RE: There's a dollar(sign) in variable name - by mwhitney - 09-10-2015, 07:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.