0

I'm using a third party wordpress plugin to incorporate realty listings into a website I'm making and I've set off trying to style the site to my needs. One of the problems I'm trying to solve is changing the slider options for an individual property page. What I would like to do is use Flexslider. I've got that working no problems with static URLS but where Im stumped is how to use the images that are pulled in from the MLS.

I did a var dump on an object that seems to hold all the data from this plugin and I found one that seems to control all the images.

["_sc_files"]=>
array(1) {
  [0]=>
  string(1129) "a:30:{i:0;a:0:{}i:1;s:25:"15212036-LargePhoto-0.jpg";i:2;s:25:"15212036-LargePhoto-1.jpg";i:3;s:25:"15212036-LargePhoto-2.jpg";i:4;s:25:"15212036-LargePhoto-3.jpg";i:5;s:25:"15212036-LargePhoto-4.jpg";i:6;s:25:"15212036-LargePhoto-5.jpg";i:7;s:25:"15212036-LargePhoto-6.jpg";}"

I'm not to familiar with this type of array/string combo and I'm wondering if it's possible to use this in with flexslider. Somehow Im sure I could use the path to where it's being uploaded but I need the dynamic image file names (15212036-LargePhoto-0.jpg) to change.

I know a loop will work for this but how do I read the data to that filename in this string?

Any advice on where to start?

1
  • NVM, found the answer in the form of PHP's unserialize function.
    – Phrosty30
    Commented Feb 12, 2015 at 19:11

1 Answer 1

1

My mistake, pretty straight forward was unfamiliar with serialize and unserialize() commands.

Simply took that string and added unserialize($string) and presto!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.