PDA

View Full Version : Event Customfields PHP Syntax


wonderfulwat
04-24-2011, 02:04 PM
I'm trying to create a php if statement for a calendar's customfield.

Statements with regular database entries work fine

if ($event['userid'] == '3')

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:

if ($event['customfields'] == 'Liberal')

Can someone show me the correct way of doing this?

wonderfulwat
04-25-2011, 04:38 PM
anyone?