user1610904 user1610904 -4 years ago 70
PHP Question

PHP - Make outputted CMS content into a php variable

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?

Answer Source
$phonenumber = perch_content('Phone Number', true);


It's always a good idea to look into documentations ;)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download