This is my code:
$str = "nbvmxnbvn Shopify.shop=gfkhfhkd";
preg_match('/Shopify.shop=/', $str, $matches);
print_r($matches);
I'm getting the output after print_r as Shopify.shop=
but I want gfkhfhkd
as the output.
This is my code:
$str = "nbvmxnbvn Shopify.shop=gfkhfhkd";
preg_match('/Shopify.shop=/', $str, $matches);
print_r($matches);
I'm getting the output after print_r as Shopify.shop=
but I want gfkhfhkd
as the output.
Modify your regex slightly so that it can capture the proper substring you're looking for.
preg_match('/Shopify.shop=(.*)/',$str,$matches);
echo $matches[1]; //gfkhfhkd