Output of Preg_match_all

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

Output of Preg_match_all

Post by swetha »

The output of print_r($match) in preg_match_all is displayed horizontally.
Array ( [0] => Array ( [0] => Array ( [0] => a [1] => 0 ) [1] => Array ( [0] => b [1] => 1 ) [2] => Array ( [0] => c [1] => 2 ) ) )

e.g how do i display the output vertically?

Array ( [0] =>
Array ( [0] =>
Array
( [0] => a
[1] => 0 )
)


thanks for help
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Output of Preg_match_all

Post by jayshields »

Use the <pre> HTML element.
Post Reply