Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-12-2007, 06:01 AM   PM User | #1
JustinMs66
New Coder

 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
JustinMs66 is an unknown quantity at this point
Question preg_match_all pattern question

i have this:

Code:
<td>
   <%test1%>
   <%test2%>
</td>

<td>
   <%test3%>
   <%test4%>
   <%test5%>
</td>

now what i need to do is use preg_match_all to eventually make this kind of an array:

PHP Code:
array(2) {
  [
0]=>
  array(
2) {
    [
0]=>
    
string(9"<%test1%>"
    
[1]=>
    
string(9"<%test2%>"
  
}
  [
1]=>
  array(
3) {
    [
0]=>
    
string(9"<%test3%>"
    
[1]=>
    
string(9"<%test4%>"
    
[2]=>
    
string(9"<%test5%>"
  
}

2 arrays because of 2 "TD"'s

but everything i try fails. can someone help me out?
JustinMs66 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:13 PM.


Advertisement
Log in to turn off these ads.