I want to display part of a variable in PHP
176.241.85.42, 13.248.97.70
I want a code that displays the variable up to this comma and displays only what is before it
#In the sense of displaying the boldness before the comma only
>Solution :
You might use a regex pattern to achieve this, which is quiet simple
preg_match('/(.*),/', '176.241.85.42, 13.248.97.70', $result);
echo $result[0] ?? '';