Jump to content

Notice: Undefined offset: 1


remshad

Recommended Posts

while i am coding to find text between some html tags ,,

am getting an error...

Notice: Undefined offset: 1 in D:\xamp\xampp\htdocs\file\dash.php on line 48

 

 

my code is at line 47 and 48 is

 

preg_match('/<td class="trow1" rowspan="3" valign="top">(.*)<\/td> /',$dat,$regs);
echo $etc=$regs[1]; 

 

i am thinking copy data from

 

</td> 
<td class="trow1" rowspan="3" valign="top"> 
Posts per day: <strong>6.03</strong><br /> 
Threads per day: <strong>3.78</strong><br /> 
Members per day: <strong>4.76</strong><br /> 
Posts per member: <strong>1.27</strong><br /> 
Replies per thread: <strong>0.6</strong> 
</td> 
</tr> 

 

 

 

this much

 

Posts per day: <strong>6.03</strong><br /> 
Threads per day: <strong>3.78</strong><br /> 
Members per day: <strong>4.76</strong><br /> 
Posts per member: <strong>1.27</strong><br /> 
Replies per thread: <strong>0.6</strong> 

 

 

Link to comment
Share on other sites

can you help me to make a better regexp for this situation .....?

 

i just want to copy this html code

Posts per day: <strong>6.03</strong><br /> 
Threads per day: <strong>3.78</strong><br /> 
Members per day: <strong>4.76</strong><br /> 
Posts per member: <strong>1.27</strong><br /> 
Replies per thread: <strong>0.6</strong> 

from

</td> 
<td class="trow1" rowspan="3" valign="top"> 
Posts per day: <strong>6.03</strong><br /> 
Threads per day: <strong>3.78</strong><br /> 
Members per day: <strong>4.76</strong><br /> 
Posts per member: <strong>1.27</strong><br /> 
Replies per thread: <strong>0.6</strong> 
</td> 
</tr> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.