Answers for "explode in php foreach"

PHP
3

explode foreach

$var = 'a/asdas/fgdfg/zfdvs/sdfh';
$array = explode('/', $var);
foreach ($array as $values)
{
//
}
Posted by: Guest on April-19-2020
1

explode in php

<?php
$str = "Hello world. It's a beautiful day.";
$split = explode(" ",$str);
$hello = $split[0];
$world = $split[1];
?>
Posted by: Guest on August-13-2021

Browse Popular Code Answers by Language