User Profile

Collapse

Profile Sidebar

Collapse
ranjithpandi
ranjithpandi
Last Activity: Jan 4 '07, 06:38 AM
Joined: Oct 31 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ranjithpandi
    replied to Just a beginner in php
    in PHP
    For beginners - http://php.net/

    Very useful site.
    See more | Go to post

    Leave a comment:


  • ranjithpandi
    replied to regular expression
    in PHP
    This will replace the entire string,includin g the braces.

    $string = " {this} chocolate belongs to {that} boy";
    $pattern = "/({[^}]+})/i";
    preg_match_all( $pattern,$strin g,$result);

    $values = $result[1];
    $replace_variab le = array('rep1', 'rep2');
    $newphrase = str_replace($va lues, $replace_variab le, $string);
    echo "<br> String : ".$string;
    echo...
    See more | Go to post

    Leave a comment:


  • ranjithpandi
    replied to regular expression
    in PHP
    This will helpful for replacing strings in the braces.

    <?php

    $string = " {this} chocolate belongs to {that} boy";
    $pattern = "/{([^}]+)}/i";
    preg_match_all( $pattern,$strin g,$result);

    $values = $result[1];
    $replace_variab le = array('rep1', 'rep2');
    $newphrase = str_replace($va lues, $replace_variab le, $string);
    echo "<br> String : ".$string;...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...