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
https://forums.phpfreaks.com/topic/248227-notice-undefined-offset-1/
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> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.