Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2004, 04:15 PM
Registered User
 
Join Date: Sep 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 15 forum bbcode

I've encountered a problem when I tried to designate words that will be replaced by different phrases on page 547.

I'm getting this error:
Warning: Unknown modifier '? in functions.php on line 334

any help is appreciated.

This is the code from the book:

function bbcode($data)
{ $sql = "SELECT * FROM forum_bbcode";
  $result = mysql_query($sql);
  if (mysql_num_rows($result) > 0)
  { while($row = mysql_fetch_array($result))
    { $bbcode['tpl'][] = "¡±" . html_entity_decode($row
                  ['template'],ENT_QUOTES). "¡±i";
      $bbcode['rep'][] = html_entity_decode($row
                 ['replacement'],ENT_QUOTES);
    }
    $data1 = preg_replace($bbcode['tpl'],$bbcode['rep'],$data);
    $count = 1;
    while (($data1 != $data) and ($count < 4))
    { $count++;
       $data = $data1;
       $data1 = preg_replace($bbcode['tpl'],$bbcode['rep'],$data);
    }
   }
  return $data;
}






Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 manal_sag BOOK: Beginning ASP 3.0 2 March 13th, 2006 04:48 PM
Chapter 15 rrlevron BOOK: Beginning ASP 3.0 0 November 17th, 2005 03:38 PM
chapter 15 manal_sag BOOK: Beginning ASP 3.0 1 June 18th, 2005 11:05 AM
Chapter 15 Forum Login Failure Indigo11 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 November 30th, 2004 12:22 PM
Chapter 15 help Lorenzo_G BOOK: Beginning ASP 3.0 1 November 27th, 2003 01:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.