Current location: Hot Scripts Forums » Programming Languages » PHP » Include PHP code...


Include PHP code...

Reply
  #1 (permalink)  
Old 09-22-05, 07:09 AM
enchen's Avatar
enchen enchen is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Include PHP code...

I'll try to make the explanation as simple as possible...

I store page text in a mySQL DB. Title, teaser and content are seperate fields in a table. The content is pulled from the DB and displayed as follows:

echo $title;
echo $teaser;
echo $content;

Inside the text that represents $content i would like to add dynamic text. So when I create the page content from the admin section I would like to be able to type:

sometext... $some_changeable_stuff...more text.

When I try to do this now it simply prints the exact same line as above without changing $some_changeable_stuff to its set value.

So what I'm asking is how do I make PHP understand that $some_changeable_stuff actually should read this_is_php_code

Hope you understood what I'm trying to do here...
__________________
Today is tomorrow, yesterday...
Reply With Quote
  #2 (permalink)  
Old 09-22-05, 07:16 AM
ben.periton ben.periton is offline
Wannabe Coder
 
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
http://uk2.php.net/eval may be what you want
__________________
Ben Periton
http://ben.periton.co.uk
Reply With Quote
  #3 (permalink)  
Old 09-22-05, 07:20 AM
enchen's Avatar
enchen enchen is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Quote:
Originally Posted by XTech
http://uk2.php.net/eval may be what you want
Thanks That was exactly what I was after
__________________
Today is tomorrow, yesterday...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
Random PHP include brduran PHP 4 08-16-04 06:34 AM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 11:19 AM
How to sale php code to customer without giving him code pradeep_soft PHP 4 03-12-04 12:10 PM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM


All times are GMT -5. The time now is 06:13 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.