Jump to content

[SOLVED] preg_match


Scooby08

Recommended Posts

Would anybody happen to know why this:

 

<hr width=$hrwidth size=$hrheight />

 

works with this:

 

preg_match("/<hr width=(\d*) size=(\d*) \/>/", $input, $match);

 

but this:

 

<hr width=$hrwidth size=$hrheight color=$hrcolor />

 

does not work with this:

 

preg_match("/<hr width=(\d*) size=(\d*) color=(\d*) \/>/", $input, $match);

 

All I did was add the color attribute and for some reason it will not match up?? Am I missing something here, or did I not supply enough information for this to be answered?? I'm also having a hell of a time understanding preg_match..

Link to comment
https://forums.phpfreaks.com/topic/132500-solved-preg_match/
Share on other sites

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.