All I want to do is get the first word from a string, it does work, but how do I get rid of the comma as well, right now I'm getting name, I want it to to just display the name with no commas or characters after.
<?php $pet_name = $pet->pet_name(); $arr = explode(' ',trim($pet_name));?>
<h1><?= $arr[0] ?></h1>