Level 102
Hard to help without any context
let id = 22;
let showPrice = {};
showPrice[id] = 'foobar';
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello guys how I will declare a dynamic variable in value such as I have 10 results and I want to declare as showPrice[id] instead of showPrice1,showPrice3,showPrice4 etc
Please or to participate in this conversation.