Laravel & Php

Php how to loop a string that has commas


How to loop a string that has commas
$string="a,b,c";
$loop=explode(",",$string);
foreach($loop as $value)
{
 echo 'this is the value -'.$value.'  | ';
}

PHP
Share with Friends

Like this chef? Share with friends..