Re: putting the result of PHP code into a string
| From: | Jason Stechschulte | Date: | Fri, 09 Nov 2001 21:56:30 +0000 |
| Subject: | Re: putting the result of PHP code into a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74061@lists.php.net to get a copy of this message | ||
On Fri, Nov 09, 2001 at 10:33:39PM +0100, Morten Gjetanger wrote:
> I like to evaluate som PHP code, but I want the result to be putted into a
> string.
> example:
>
> $var = "Test1";
> $code = "<td><?php echo $var1?></td>";
> $html = someFunction($code);
>
> After this i want $html to contain "<td>Test1</td>
$var = "Test1";
$code = "<td>$var</td>";
$html = someFunction($code);
Done.
--
Jason Stechschulte
jpstech@unoh.edu
--
"You can't have filenames longer than 14 chars.
You can't even think about them!"
-- Larry Wall in Configure from the perl distribution