$items = "word1 word2 word3 word4";
$items = explode(" ", $items);
$items is my array, how can I have it turn into this
Like how can I make word1 be a key and a value?
"word1" => "word1"
$items = "word1 word2 word3 word4";
$items = explode(" ", $items);
$items is my array, how can I have it turn into this
Like how can I make word1 be a key and a value?
"word1" => "word1"
$items = "word1 word2 word3 word4";
$temp = explode(" ", $items);
$result = array();
foreach ($temp as $value) {
$result[$value] = $value;
}