Skip to content

Instantly share code, notes, and snippets.

@uglyeoin
Last active May 30, 2017 15:20
Show Gist options
  • Save uglyeoin/f35f931638dc874855e9cb3510857a95 to your computer and use it in GitHub Desktop.
Save uglyeoin/f35f931638dc874855e9cb3510857a95 to your computer and use it in GitHub Desktop.
<?php echo $displayData->dpfields; ?>
<?php
foreach ($displayData->dpfields as $field) { $this->item->dpfields; if ($field->id == 1) { echo $field->value; }}
?>
The reason I choose id == 1 is because that is the field in the array that I wanted to display at that point. If you wish to find out which number in the array to find your fields you can use
echo "<pre>" . print_r($this->item->dpfields, true) . "</pre>";
////
<?php echo $displayData->jcfields; ?>
<?php
foreach ($displayData->jcfields as $field) { $this->item->jcfields; if ($field->id == 1) { echo $field->value; }}
?>
The reason I choose id == 1 is because that is the field in the array that I wanted to display at that point. If you wish to find out which number in the array to find your fields you can use
echo "<pre>" . print_r($this->item->jcfields, true) . "</pre>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment