Contact: aviboots(AT)netvision.net.il
31,166 questions
40,722 answers
573 users
$str = "PHP C Python Java Go Rust C#"; $words = explode(" ", $str); foreach($words as $word) { echo $word[0] . " "; } /* run: P C P J G R C */
$str = "PHP C Python Java Go Rust C#"; preg_match_all('/\b\w/', $str, $matches); $firstLetters = implode(' ', $matches[0]); echo $firstLetters; /* run: P C P J G R C */