![]() |
Pulling data out from customfields
I'm planning to show 1 event by memebrs at their public profile.
This should be the query: PHP Code:
like in the following example: a:2:{i:1;s:4:"Club";i:2;s:8:"Helsinki";} What would be the best php code snippet for getting "Club" and "Helsinki" in displayed the final output? Thanks for any insight. -Mika |
That is the data you want. It is an array (as seen by the "a" at the start I think) with 2 objects (denoted by the 2 at the start I believe, Im not entirely sure the inner workings of serializing data).
You can do this: $customArray = unserialize($row["customfields"]); array(2) { [1]=> string(4) "Club" [2]=> string(8) "Helsinki" } |
Quote:
Quote:
This is the code outlining also the problematic, still missing variables PHP Code:
Once again... Thank's for any insight. -Mika |
case solved and closed.
|
All times are GMT. The time now is 08:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|