[nycphp-talk] Help with evaluating a string into an actual PHP line
Phil Powell
soazine at erols.com
Wed Sep 3 03:46:22 EDT 2003
The following lines are in a TCL script I wrote:
#$xmlTclAssocArray = ('email.xml' => 'emailalert', 'feedback.xml' => 'feedback', 'pollresults.xml' => 'poll', 'profileMember.xml' => 'profile', 'triviaresults.xml' => 'trivia');
# THE PRECEDING LINE IS A COMMENTED-OUT PHP LINE TO BE USED BY alert_view_redirect.php
Only the first line needs to be read by a PHP script, doing an fgets to obtain it, chopping off the "#" from it by doing
a substr($arraySyntax, 1, strlen($arraySyntax) - 1) on it.
But the trick is that I have to evaluate that line into an actual PHP command as this line is dynamically generated by TCL and not PHP. How then do I convert this string into an actual existing PHP line that will create an array called $xmlTclAssocArray?
Thanx
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030903/d9e5f8dc/attachment.html>
More information about the talk
mailing list