preg_match help
Posted: Wed May 30, 2012 8:45 am
So I have a result from an API call and my skills in regular expressions and preg_match() are limited.
The result looks like this:
[{"county_name":"Albany","description":null"}]
This obviously doesn't work because I'm not too good with regex stuff
So I need the county name out of the string.
The result looks like this:
[{"county_name":"Albany","description":null"}]
This obviously doesn't work because I'm not too good with regex stuff
Code: Select all
if (preg_match('{"county_name":"', $content, $result)) {
$county = $result[1];
}