ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP + EE custom field problem

November 15, 2010 1:44pm

Subscribe [3]
  • #1 / Nov 15, 2010 1:44pm

    Incite

    20 posts

    I’m trying to make the following work but it just doesn’t:

    Let’s assume {users} contains “12,34,56,23,78”

    <?php
         $users = "{users}";
         $users = explode(",", $users);
         print $users[0];
     ?>

    The result is this, so obviously explode is not working at all. Any ideas?

    12,34,56,23,78
  • #2 / Nov 15, 2010 2:34pm

    james Brown

    492 posts

    You might want to first check that PHP is enabled for that template and that the parsing stage is set to Output.

  • #3 / Nov 15, 2010 2:36pm

    Incite

    20 posts

    It actually wasn’t set as Output.

    I used the ajax way to set the template to output in the Template Manager and I got the notification that it worked, but even after doing that I have to go into the template and save it again to get it working.

    Weird, it seems to be more like a bug in the Template manager.

  • #4 / Nov 15, 2010 5:55pm

    Ingmar

    29245 posts

    So, working as expected now?

  • #5 / Nov 15, 2010 5:56pm

    Incite

    20 posts

    Yes, my part was correct, it seems to be a bug in the Template Manager.

  • #6 / Nov 15, 2010 5:59pm

    Ingmar

    29245 posts

    I am not aware of any bugs. Perhaps you should try to replace your files, CP theme files etc. in particular?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases