Recursive Interpolation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

I've seen a few posts from the middle of last year discussing the problem 
of recursive interpolation:

http://marc.theaimsgroup.com/?l=php-general&m=105543152906744&w=2
http://marc.theaimsgroup.com/?l=php-general&m=105542523331255&w=2

It seems there's a HEREDOC method of hacking through this problem. In the 
meantime, is there any other way?

Here's a description of a problem I'm having and how it would be nice to 
see it solved:

Database *FIELD* with text data in it. The text data contains sentences 
interspersed with $foo['bar'] array variables. The idea is that when one 
selects this field, PHP will interpolate $foo['bar'] with the currently 
defined $foo array variable. This allows for "form letter" like dispatches 
to be created.

Given a variable $text that contains data retrieved with array variables, 
It'd be useful to see something: $text_i = interpolate($text) which 
recursively interpolates based on variables in the current namespace.

Granted, this opens up a *WHOLE* mountain of problems (circular references 
anyone?). Is there any traction on an idea like this? Any other solutions 
that aren't so hackish as HEREDOCs?

Thanks,

-Chuck

-- 
http://www.quantumlinux.com 
 Quantum Linux Laboratories, LLC.
 ACCELERATING Business with Open Technology

 "The measure of the restoration lies in the extent to which we apply 
  social values more noble than mere monetary profit." - FDR

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux