Jump to content

preg_match help


jake2891

Recommended Posts

thanks for your reply. Although im passing the value 3 via the url. So would there be another way of doing it mathematically besides the following way below?

 

eg '/1\+2=3/' instead of '/3/'

 

if(preg_match('/3/',$this->getRequest()->getParameter('test'))) // test holds the value 3

{

  $this->test = "your paramater matches.";

  echo $test;

}

Link to comment
https://forums.phpfreaks.com/topic/129246-preg_match-help/#findComment-670082
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.