I am trying to break down a string into an array and then print the values on the screen. Here is the string that i am trying to break:
"Cog|Condor"
"|" using this to split it. Here is how I am doing it:
<?= $arrays = explode('|', $b->brand); foreach($arrays as $array){echo $array;} ?>
But i keep getting this exception:
2/2) ErrorException
Array to string conversion (View: D:\Code\PHP\Code\CrownBillingSystem\resources\views\pages\print.blade.php)
in 6e7ee4930110d4a26a3e31e0ddfe8b87849a1319.php (line 93)
at CompilerEngine->handleViewException(object(ErrorException), 1)
in PhpEngine.php (line 44)
at PhpEngine-
I cannot figure out what is wrong here.
@phpand@endphpin place of the<?=and?>respectively