I use Perch for CMS, and in order to output content, you put the following code in your page:
<?php perch_content('Phone Number'); ?>
However, I need to make the outputted content into a php variable, something like:
$phonenumber = perch_content('Phone Number');
I'm a complete php novice and I've tried a few things but nothing is working.
Any ideas?
$phonenumber = perch_content('Phone Number', true);
see http://docs.grabaperch.com/docs/content/perch-content/
It's always a good idea to look into documentations ;)
For specific content I had to use:
perch_content('Events', array(
'page' => '/sites/events.php',
'skip-template' => true
));