Announcement

Collapse
No announcement yet.

Vb-style "replacements"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vb-style "replacements"

    I am making a template-based web site, and I would like to know how vbulletin replaces the replacements so quickly. I can use "eregi_replace()", but it takes a while. Can anyone help me?

  • #2
    I'm not familiar with vB coding, so I can't comment on that. But..

    eregi() is slower than preg_replace()

    and even faster is str_replace()

    Comment


    • #3
      Thanks for the help anyways.

      Comment


      • #4
        PHP Code:
        $formattedText str_replace('{replacementvariable}''#000000'$text); 
        You can also use arrays with str_replace(), check out the PHP docs for more info.
        Chen Avinadav
        Better to remain silent and be thought a fool than to speak out and remove all doubt.

        גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X