note 58329 added to language.variables
| From: | stuart at deadbodiesdontdrown dot com | Date: | Mon, 31 Oct 2005 18:36:24 +0000 |
| Subject: | note 58329 added to language.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97888@lists.php.net to get a copy of this message | ||
i made this to load all my classes dynamically and create a default copy of each one.
if($return=="class"){
$massclass=massinclude($folder,$prefix,$ext,$return); // this gathers all the files that are named
in the class structure i have
$massclassNum=count($massclass);
$i=0;
while($i<$massclassNum){
$thisclass=prefix($massclass[$i]); // i added "sixletterwords_" as a prefix.
if(class_exists($massclass[$i])){
${$thisclass}=new {$massclass[$i]};
}
++$i;
}
}
this ofcourse is only a snippet of code. but what i did was looped through all the class names, and
created a var for each, but added a prefix to them and stuff. maybe this'll help. it
wasn't hard.
----
Manual Page -- http://www.php.net/manual/en/language.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58329
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58329&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58329&report=yes
Search -- http://master.php.net/manage/user-notes.php