|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-16 09:07 UTC] sander@php.net
[2002-06-16 11:08 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
<?php class testclass { function assign($var, $value) { $this->$var = $value; } } $testobj = new testclass(); $testobj->testvar = 20; $testobj->assign("testvar", 30); echo $testobj->testvar; // Result = 30 - very good! $testobj->testarray["dim1"]["dim2"] = 20; $testobj->assign("testarray[dim1][dim2]", 30); echo $testobj->testarray["dim1"]["dim2"]; // Result = 20 - bad (should be 30)! ?>