I'm trying to create a php if statement for a calendar's customfield.
Statements with regular database entries work fine
PHP Code:
if ($event['userid'] == '3')
PHP Code:
if ($event['title'] == 'Michael Ignatieff’s Town Hall for Canada')
but when I try to do an if statement for a customfield it doesn't work.
This is the mysql database entry under the 'event' table
customfields | a:1:{i:2;s:7:"Liberal";}
ideally my if statement would look like this, but i know it doesn't work:
PHP Code:
if ($event['customfields'] == 'Liberal')
Can someone show me the correct way of doing this?