fork(1) download
  1. <?php
  2.  
  3. $document = "{title}this is the title{/title}";
  4. preg_match("/{title}(.*){\/title}/", $document, $match);
  5. //echo $match; // PHP Notice: Array to string conversion in /home/jxkaKh/prog.php on line 5
  6. print_r($match);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [0] => {title}this is the title{/title}
    [1] => this is the title
)