Item::getLore() returns an string array (string[]). So each element of the array is a string, what you can do to get it together as single string, is to implode it. PHP: // Implode accepts it's arguments in any order for historical reasons.$lore = implode($item->getLore(), " ");