Jump to content

simple combine these two values?


wkilc

Recommended Posts

I am attempting to flush values from a URL query with a pagation script.

 

This line of code will replace one value:

$page_name2 = preg_replace('/&?start=\d+/','',$page_name);

 

This line of code will replace the second value:

$page_name3 = preg_replace('/&?limit=\d+/','',$page_name);

 

Can I combine them to replace both values in replace?

 

This obviously isn't it:

$page_name3 = preg_replace(('/&?limit=\d+/','',)&&('/&?start=\d+/','',)$page_name);

 

Thank you.

 

Link to comment
https://forums.phpfreaks.com/topic/212605-simple-combine-these-two-values/
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.