It maybe easy to do but I am new to php. I really need to know how to solve it.
$first = $second;
$second = 4;
I need to pass the value of $second to $first dynamically whenever it changes.
please help,
Thanks
It maybe easy to do but I am new to php. I really need to know how to solve it.
$first = $second;
$second = 4;
I need to pass the value of $second to $first dynamically whenever it changes.
please help,
Thanks
Share Improve this question asked Jan 11, 2020 at 18:36 AshurAshur 233 silver badges8 bronze badges 1- as I know, php will execute and process the code in logical order it will appear at runtime. You need to store the variable inside the database if you want to retrive it later. – sialfa Commented Jan 11, 2020 at 19:07
1 Answer
Reset to default -1First, your question is purely PHP, I do not see a relationship with WordPress. If you want to link the two variables, you must use what is called: Passing by reference
In your case :
$first = & $second
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744843394a4596693.html
评论列表(0条)