Jump to content

quoted numbers preg_replace


scottybwoy

Recommended Posts

yes, but it only works within the pattern or within the 2nd argument of preg_replace. You can't turn around do for instance

 

$num = $1;

 

If you want to be able to do something like that, then you need to use preg_match or preg_match_all and it will be assigned to an array specified in the 3rd argument.

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.