A preg_match_all problem. Looking for co-operation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

soul_fly
Forum Newbie
Posts: 22
Joined: Mon Aug 24, 2009 2:24 pm

Re: A preg_match_all problem. Looking for co-operation

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: A preg_match_all problem. Looking for co-operation

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: A preg_match_all problem. Looking for co-operation

Post 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.
soul_fly
Forum Newbie
Posts: 22
Joined: Mon Aug 24, 2009 2:24 pm

Re: A preg_match_all problem. Looking for co-operation

Post 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. :)
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: A preg_match_all problem. Looking for co-operation

Post by jackpf »

L0l no problem.

Glad it worked.
Post Reply