Hello,
Manual and news group search returned to result on this topic. (or May
be I miss something.)
The objective : to be able to identify (print, compare, etc.) variable
name as a String to be able to override class method based on variable
name. Variable will be an associative array.
Consider the following class method reconstraction :
<?php
$variable = array();
# I CAN NOT do variable variables thing here like
function ($$variable) {
if ($variable = "Text") {
$result = "<input type=\"text\" ";
foreach ($$variable as $prop=>$value) {
$result .= "$prop=\"$value\" ";
}
$result .=">";
return $result;
} elseif {($variable = "Area")
$result = "<textarea ";
foreach ($properties as $prop=>$value) {
$result .= "$prop=\"$value\" ";
}
$result .=">";
return $result;
}
}
?>
QUESTION: It is any way to extract "variable" string from $variable ?
Thank you very much for any helpfull input regarding topic.
Maxim Volkov
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]