Page 2 of 2

Re: A preg_match_all problem. Looking for co-operation

Posted: Tue Sep 22, 2009 4:21 pm
by soul_fly
Dude McInfo, first of all, thanks for your quick reply. But It still didn't work on the link i was trying. Interesting it worked on many other links.

I just did pm with a web-link on which I was trying that. Output shows: Array ( [0] => Array ( ) [1] => Array ( ) )

plz have a look in dm and reply if you have time. :) Thanks in advance.

Re: A preg_match_all problem. Looking for co-operation

Posted: Tue Sep 22, 2009 4:41 pm
by jackpf
McInfo wrote:It's not obvious how the HTML is being acquired by the script or even if the HTML is making into the $str variable.
Seriously, where else would it come from?

If I'm an ass because I assume that the OP will have at least the slightest knowledge of PHP, then yeah, I guess I'm an ass.

If you want to write everything out for everyone who asks a question, then fine, you do that.

Re: A preg_match_all problem. Looking for co-operation

Posted: Wed Sep 23, 2009 2:24 am
by jackpf
Ok, well, he didn't actually state how he received the HTML in his previous posts. He simply used the variable $str. I also used that variable. He did not ask how to retrieve the HTML, he asked for the regex. I gave him the regex.


Anyway, this is pointless. There's no point in arguing about it.

Re: A preg_match_all problem. Looking for co-operation

Posted: Wed Sep 23, 2009 7:03 am
by soul_fly
ohhhh noo!!!! I guess that I caused a big fight :(

Dude jackpf, I made a sample problem similar to my real project then started this topic of preg_match_all. The regex you provided was 100% ok but I couldn't make it work with my web url. Therefore, later I came up with my real problem and I stated how I received the HTML in $str; I posted whole php codes. But it was still causing problem with output. Then McInfo realized that variables must be eliminated using var_dump for this special case (I emailed him my url I was working). Thats all the scenario.

I will try my best to explain my problems more detailed way in future so that such confusion doesn't arrive. I'm sorry for that. :)

Re: A preg_match_all problem. Looking for co-operation

Posted: Wed Sep 23, 2009 7:40 am
by jackpf
L0l no problem.

Glad it worked.