Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 30 Jan 2012, 15:23
squeezerbabe squeezerbabe is offline
 
Join Date: Nov 2011
help: extracting data from calendar custom fields

Hi

Total PHP newbie here so really stuck and would appreciate any help!!

I have created some custom fields to my calendar - basically event type, location and time.

These are stored in the "event" entity in the field "customfields" as follows:-

a:3:{i:4;s:7:"Concert";i:5;s:29:"Town Hall";i:6;s:3:"20:00";}

I've now created a page where I want to display these details. I can get the date and event title to show ok but when I add the customfield I'm obviously getting all the codes too.

How do I seperate this field so that I end up with Concert, Town Hall, 20:00 in variables so that I can output these on my page were required.

Thanks in anticipation of an answer

Last edited by squeezerbabe; 30 Jan 2012 at 15:24. Reason: spelling
Reply With Quote
  #2  
Old 30 Jan 2012, 19:06
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
That string is a serialized array, so you'd run the value through the unserialize() php function, and the result should be an array of 3 strings.
Reply With Quote
  #3  
Old 31 Jan 2012, 08:13
squeezerbabe squeezerbabe is offline
 
Join Date: Nov 2011
many, many thanks - will try that.

Appreciate you taking the time to answer.
Reply With Quote
  #4  
Old 31 Jan 2012, 12:55
ProFifaLeagues's Avatar
ProFifaLeagues ProFifaLeagues is offline
 
Join Date: Aug 2009
Real name: Rob
If you manage to get this Going it would be great to see it in action mate,Something Vbulletin needs as default
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:18.

Layout Options | Width: Wide Color: