tonelm54
asked on
Pointer to variable as a variable
Is there a way in PHP to setup a pointer to another variable, change it which changes the initial variable?
So, for example:-
Any suggestions?
So, for example:-
$arr[6]['cnt'] = 0;
$currentPointer = $arr[6]['cnt'];
$currentPointer++;
//Should echo out 1
echo $arr[6]['cnt'];
I know my code doesn't work, and I know its wrong, but I have no idea how pointers work in PHP, or if its even possible.Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window