I have an authentication system setup that relies upon an object->method() to do authentication. However, the new $_SESSION['var'] way of doing things seems to break it. See the code below:
<?php
class someobj {
function output($sometext) {
echo $sometext;}
}
session_start();
$SESSION['sess'] = new someobj;
$text_to_say = 'interesting info';
$SESSION['sess->output($text_to_say)'];
?>
This does NOT work. Any ideas on how to get something like this to work correctly? I have tried doing $_SESSION['sess->output(' . $text_to_say . ')']; but it returns a quote issue. Using double quotes on the outside does not work, either.
Ideas on how to call object methods from inside an array?
Thanks,
Randal Kohutek
randal@hpi.net