-2

i need to explode this {{{data.comment}}} in php.
I'm a beginner thank you.

<span class="um-activity-comment-text">
<?php            
        $comm = '{{{data.comment}}}';
        echo explode(' ', $comm)[0]; //--> this is not working. 
        ?>
</span>
M.Hemant
  • 2,345
  • 1
  • 9
  • 14

1 Answers1

0

by putting `{{}} 'you already do' echo 'so try

<?php echo explode(' ', data.comment)[0]; ?>