Jump to content

Beginners Php Question - Preg_Match


alecthorne

Recommended Posts

I am a total beginner at php, and have found a need for preg_match. Even after looking through posts here, this example is still rather beyond me. Can someone point me in the right direction.

 

I have a string $params with the content as below.

{

"metadata.title": "",

"metadata.description": "",

"metadata.keywords": "",

"metadata.robots": "",

"metadata.author": "",

"config.enable_comments": "0",

"config.primary_category": "311"

}

How can I extract the value between the "" after the primary_category, in this case 311.

 

Thanks,

Alec

Link to comment
https://forums.phpfreaks.com/topic/269993-beginners-php-question-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.