Online, etc. How do I write a variable value as a variable name? $ Data is in JSON format and has been decoded. Now the question is how to call $ data [0]-d13 when the value of $ week is 1. Where is the value of d + $ week + 3 written ?? I don't think I can use $. Solution !! ------ Solution ---------------------- $ data [this article is from the Internet (www.
Online, etc. How do I write a variable value as a variable name? $ Data is in JSON format and has been decoded. Now the question is how to call $ data [0]-d13 when the value of $ week is 1. Where is the value of d + $ week + '3 ?? I don't think I can use $. Solution !! ------ Solution -------------------- $ data = [this article is from the Internet (http: // www.
Online, etc. How do I write a variable value as a variable name?
$ Data is in JSON format and has been decoded.
Now the question is how to call $ data [0]-> d13 if the value of $ week is 1. Where the value of d + $ week + '3'
How to write ??
I don't think I can use $.
Solution !!
------ Solution ----------------------
$ Data = [this article from Internet (http://www.68idc.cn)] json_decode ('[{"d13": 123}]');
$ Week = 1;
Echo $ data [0]-> {'D'. $ week. '3 '};
123