- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$keyword = "o negative blood donor in khulna";
$pattern = "/(?i)\b[abo]\s+(?:posi|nega)tive\b|\S+/";
preg_match_all($pattern, $keyword, $keyword_array);
print_r($keyword_array[0]);