|
Posted by burgermeister01 on 08/14/07 13:57
On Aug 14, 8:49 am, Luca Cioria <virch...@gmail.com> wrote:
> I know it may seem odd, but is it possible to echo to php? I mean
> neasting php within php?
>
> example
>
> <?php
>
> $array_levels="[1][2][3]";
>
> $my_array<?php echo $array_levels; ?>="hello world"
>
> ?>
>
> It may seem stupid but would be powerful, wouldn't it?
> How can I accomplish what I just did differently?
> bye
What you're talking about is the eval() command. This allows you to
execute a string as PHP. Although most programmers will tell you that
this is sloppy, bad programming. IMO eval() has its time and place,
but you should use it like a last resort. If I were you, I would try
and find a different solution first.
Navigation:
[Reply to this message]
|