You are here: Re: echo to php « PHP Programming Language « IT news, forums, messages
Re: echo to php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация