Can I return part of a field key (name)?

If I have a field key socialfacebook and I want to return just facebook - is this possible?

http://php.net/manual/de/function.substr.php Your start position would be 6.

1 Like

Many thanks, this is now my working code

<?php $socialicon = substr($site->{$field}()->key(), 6); ?>