Printing the result of regexp

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
swetha
Forum Commoner
Posts: 88
Joined: Wed Sep 10, 2008 11:00 pm

Printing the result of regexp

Post by swetha »

Hi,
when i print the result of preg_match using
print_r ($matches),the contents of the array are all displayed in one line.
like this?
Array ( [0] => Array ( [0] => Array ( [0] => a [1] => 0 ) [1] => Array ( [0] => b [1] => 1 ) [2] => Array ( [0] => c [1] => 2 ) ) )

how do i display the contents of the array in seperate lines?
User avatar
prometheuzz
Forum Regular
Posts: 779
Joined: Fri Apr 04, 2008 5:51 am

Re: Printing the result of regexp

Post by prometheuzz »

Post Reply