views:

28

answers:

1

I have products : offer_id in javascript and am getting value of offer_id dynamically.

Let say I get products : 12345 but now instead of that I want it to be as products : ;12345, than how can this be achieved in javascript.

I have tried :

  1. products : ';'.offer_id
  2. products : ';'."offer_id"
  3. products : ';'.'offer_id'
  4. products : ";".offer_id

But all of my above trials have failed and am getting syntax error for each one of those. I am newbie to Javascript and so would really appreciate any inputs.

+2  A: 

In PHP the concatenation character is . but in JavaScript is +

products : ';'+offer_id
Cristian
I'd like to point out that PHP is retarded. :-p
David Murdoch