Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
537 B
1
Indexable
Never
            function str_count($string) {
                $array = [];
                $word = "";
                for ($i=0; $i<mb_strlen($string); $i++) {
                    $if ($string[$i] == " ") {
                        array_push($array, $word);
                        $word = "";
                    }
                    else {
                        $word .= $string[$i];
                    }
                } 
                return $array;
            }
            $string = "Mollit minim magna sint nostrud aute eu.";