Chris wrote:
Schalk wrote:
Chris wrote:

Chris wrote:

....

actually if it's only one variable, this might do it for you:

$content = str_replace('<?php echo _root ?>', _root, $content);

but that's still a bad way to do this.

Chris,

This works:

$breadcrumb = $row_pathway['pathway'];
$breadcrumb = str_replace('<?php echo _root ?>', _root, $breadcrumb);

echo $breadcrumb;

However, I would still like to know why this is a bad way to do this and hopefully find a better way. Still learning all the aspects of PHP so any input is appreciated.


Because you're including your config details in your data (I don't think you should do this, but others may disagree).

The str_replace method should be pretty fast and won't introduce any security issues like the 'eval' method I originally mentioned would.

Thank you for all of your help Chris. Much appreciated.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
US Tel: (440) 499-5484
Fax: +27125468436
Web
email:[EMAIL PROTECTED]
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: [EMAIL PROTECTED]

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/

The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error, please 
contact the sender and please delete all traces of this material from all 
devices.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to