[PHP] global class instance

2006-07-01 Thread sempsteen
hi all, i wonder if there is a way of creating an instance of a class and reach it direcly from any scope in PHP4. basically what i want is: class a { function print() { echo 'sth'; } } $a = new a(); and use this "a" instance from anywhere ex, in a function that is a method of anothe

[PHP] Re: global class instance

2006-07-01 Thread sempsteen
i don't want to: - declare global $foo, there is a mistake. it was not global $foo, it is global $a :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] working on a template system...

2006-06-27 Thread sempsteen
hi, i'm working on a template system. Basically i'm building raw contents in arrays and then put them in templates by some special tags. for loop systems my basic array structure is like this: $array['key'][]['keyword'] = ... for example, for a bulletin board system, array structure for categori