Important Definition Script Needed, PLZ!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Daemon_B
Forum Newbie
Posts: 13
Joined: Mon Sep 20, 2004 1:08 am

Post by Daemon_B »

Sorry, I was just using the Quick reply, Thankyou so much for the link, ill run threw it and if I have questions ill return and ask properally...
User avatar
Daemon_B
Forum Newbie
Posts: 13
Joined: Mon Sep 20, 2004 1:08 am

Post by Daemon_B »

What is EOF?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

end of file.
User avatar
Daemon_B
Forum Newbie
Posts: 13
Joined: Mon Sep 20, 2004 1:08 am

Post by Daemon_B »

Hello,

I ended up just using str_replace and ob_start to create a buffer for a string. In short, I have a config.php file with my functions...

Code: Select all

function definition($buffer)
{
  $words = array("Microsoft", "french", "fries");
  $words_link = array("<a href=define.php?word=Microsoft>Microsoft</a>", "<a href=define.php?define=french>french</a>", "fries");
  return (str_replace($words, $words_link, $buffer));
}
Then in my index i call the function with op_start while it loads the file into the buffer

Code: Select all

ob_start("definition");  include 'includes/idx_nav.php'; ob_end_flush();
Thankyou for your help peeps...if you read my source and find something that might be better please post...Im alright with it..I use CSS to set the font and styles of course...but I dont like the idea about a buffer...cause of buffer overflows I know of...anyways, later days
Post Reply