Re: making php code from db work

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

 



Hi!

On Fri, 17 Mar 2006 12:07:42 +0200
Schalk wrote:

> Greetings All,
> 
> I pull the following snippet of code directly from a MySQL
> database:
> [ . . . ]
>     <li><a href="<?php echo _root 
> ?>/expertise/index.php?
> category=specialized_expertise&amp;content=Intermodal&amp;side_content=our_work"
> title="Intermodal">Intermodal</a></li>
> [ . . . ]
> 
> As you can see in line three, I use the following PHP code
> there: <?php echo _root ?>
> 
> Unfortunately when this is loaded into the PHP page this bit
> of code is not parsed and the link still includes the code
> snippet. Is there a way I can make this work or would it be

Hmm.. I wanted to say check http://www.php.net/eval but
then again, someone very famous in this group once said:

 "If eval() is the answer, you're almost certainly
  asking the wrong question."

So, maybe, I shouldn't even recommend that. (^_-)

Try:

  http://www.google.com/search?q=parsing+php+code+db

> better to build this nav tree in a more robust fashion such
> as loading the <li> one by one in a for loop for example?

Maybe that one's better.

> Thanks in advance.

HTH,

- Edwin -

-- 
"A wise person will listen and take in more instruction."
                                  - Proverbs 1:5

-- 
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