Need Some PhpHelp Urgent

Discussion in 'PHP' started by koolasia, Nov 28, 2006.

Thread Status:
Not open for further replies.
  1. #1
    I am using a script

    which replaces "." in the output as "_"

    i want "." to stay as it is

    Smarty is used in the script

    how can i get this problem solved
     
    koolasia, Nov 28, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Without seeing the script we can't help.

    Base don extreme guesswork, look for str_replace(".", "_"); and delete it.
     
    T0PS3O, Nov 28, 2006 IP
  3. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Its A Paid script so im not sure if i can share the source

    but here is 1 code i think needs to be changed is it this or some other

      $s = preg_replace('/[^\w]/','_', $s);
      $s = preg_replace(
        array('/[\xf1]/','/[\xe0\xe1]/','/[\xe8\xe9]/','/[\xec\xed]/','/[\xf2\xf3]/','/[\xf9\xfa]/'),
        array('n','a','e','i','o','u'),
        $s );
      $s = urlencode($s);
      $s = preg_replace('/%[A-F0-9]{2}/','_',$s);
      $s = preg_replace('/_{2,}/','_',$s);
      $s = trim($s,'_');
      return $s;
    Code (markup):
    anything to change in this code
     
    koolasia, Nov 28, 2006 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I hate Reg Exp so badly I'll pass. It doesn't just replace dots but more. You'll have to add an exception to it somehow (don't know how).
     
    T0PS3O, Nov 28, 2006 IP
  5. koolasia

    koolasia Banned

    Messages:
    1,413
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #5
    oh shits its tough work who is gonna help me solve this
     
    koolasia, Nov 28, 2006 IP
Thread Status:
Not open for further replies.