User Profile

Collapse

Profile Sidebar

Collapse
Edan
Edan
Last Activity: Sep 19 '08, 07:10 PM
Joined: Dec 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I see. I've changed a couple of things to get a solution, and it's fine, but I will read about design patterns anyway.

    Thanks,
    Edan
    See more | Go to post

    Leave a comment:


  • C++: Copying protected members of base class to derived class

    I have a base class with protected members (`Base`). The function `MakeBase()` is a member function of another class, that returns a `Base` object initialized with private members of this class.
    Now the thing is, I want to extend the functionality of `Base` class. I do that by inheriting `Base` class by `Derived`, but then I can't use `MakeBase()` function. It all makes sense to me, but I don't seem to find an appropriate solution.
    ...
    See more | Go to post

  • Edan
    replied to Remove everything between square brackets.
    in PHP
    Okay --

    Code:
    $string = '1 [fsdfsdfsdf] 2 [fsdfsd] 3';
    $string  = preg_replace('/\[(.*)\]/', '', $string); 
    echo $string;
    Outputs '1 3' for some reason (while it should output 1 2 3).

    Unfortunately, I'm not very good with regular expressions and I can't work this out.
    See more | Go to post

    Leave a comment:


  • Edan
    started a topic Remove everything between square brackets.
    in PHP

    Remove everything between square brackets.

    Hello

    I'm trying to remove square brackets and everything between them from a string, using regular expressions
    I know how to use preg_replace, and know the basics of regex, but can't success.
    Can anyone please give me a regex for it?

    Thanks in advance!
    Edan
    See more | Go to post

  • Edan
    replied to Redirecting subfolder to other URL
    Definitely.
    You can use mod_rewrite.

    First, you must enable mod_rewrite in httpd.conf. Find the following line and uncomment it (If you have no access to this file, just ask your host company to enable mod_rewrite).

    Code:
    #LoadModule rewrite_module modules/mod_rewrite.so
    Now create a file named ".htaccess" in your main www directory (or modify an existing one), and write the following:
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...