PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Nov 19, 2019 7:36 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat May 21, 2005 12:25 pm 
Offline
Forum Regular
User avatar

Joined: Thu Nov 25, 2004 10:53 pm
Posts: 708
Location: U Michigan


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 22, 2005 9:54 am 
Offline
Forum Newbie

Joined: Fri Apr 08, 2005 7:17 am
Posts: 20
Why don't you just put the preg_match in a wrapper funtion, and then fill in your own array with the match results. Easy as that!

Syntax: [ Download ] [ Hide ]
function myVeryOwnWrapperFunction ($pick) {

  $regex = "#^\((\d{1,4})\)\t\t(\d\d/\d\d/\d\d)\t((\d)-(\d)-(\d)-(\d))";

  preg_match( $regex, $pick, $parts );

  return array (

           $parts[0],

           $parts[1],

           $parts[2],

           array (

             $parts[4],

             $parts[5],

             $parts[6],

             $parts[7]

             )

           );

}


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 22, 2005 11:58 am 
Offline
Forum Regular
User avatar

Joined: Thu Nov 25, 2004 10:53 pm
Posts: 708
Location: U Michigan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group