Posted by Krustov on 03/27/07 20:24
<comp.lang.php>
<iktorn>
<Tue, 27 Mar 2007 21:55:14 +0200>
<eubsnv$qnr$1@news.task.gda.pl>
> You can try this:
>
> <?php
> $text ="sajdkahs (2005) asgjgdjasdkh (20056) hdsgfjsgfsd
> ajgsda (1234 jksdhkjfhskjdh ) sgfdggsd (1256)";
> if(preg_match_all("/\([0-9]{4}\)/",$text,$matches)) {
> print_r($matches[0]);
> }
> ?>
>
Works fine .
But print_r is something i havent got around to learning yet .
How do i grab the data from it instead of having it printed to the
screen .
Navigation:
[Reply to this message]
|