I have a PHP string that contains numbers. Is there a way to add up all the numbers in a string?
For example: I have a string called $soc_count. That string outputs the following:
1 1
Is there a way to add up all the numbers in a string?
My code:
<?php $soc_count = [];$soc_count = (get_row_layout() == 'irl_today_social_media');?>
<?php echo $soc_count;?>