On 02-06-2009 at 18:14:27 Igor Sverkos <igor.sverkos+php...@googlemail.com> wrote:

$value = phptal_tales($src,$nothrow);

>    $result = date('o-m-d H:i:s', $value);
>    return '"' . $result . '"';
> }

Hmm.. doesn't work for me.
After the phptal_tales() call, $value has the value:

(string:31) phptal_path($ctx->item, 'date')

Sorry, I've rushed with the answer.


phptal_tales_myDate() is called at compile time only. It should not return the date (because there isn't any value yet), but code that will generate the date at run time.

phptal_tales() returns code that will evaluate to the value.



return 'date("o-m-d H:i:s", ' . phptal_tales($src, $nothrow) . ')';


--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to