3

Warning: explode() expects at most 3 parameters, 4 given

 2 years ago
source link: https://www.codeproject.com/Questions/5321215/Warning-explode-expects-at-most-3-parameters-4-giv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Copy Code
$result = $stmt->fetchAll(PDO::FETCH_COLUMN);
   if($result)
            return get_item_name(explode(' ','-1','0', $result[0]));
   else {
        return 'Empty';
        }


Warning: explode() expects at most 3 parameters, 4 given in vault.php on line 43

get_item_name_locale_name is other function that give names to each number


Database Column Data [6673 6669 4860 6670 -1 6671 6672 169 166 173 -1 -1 15 15 18 15 0 15 15 0 0 0 0 0]
"space","0","-1" must be ignored , somehow bigger than 1 must show


Thank you very much

What I have tried:
Copy Code
 if ($result) {
    return array_map(function ($row) {
        get_item_name_locale_name($row);
    }, $result);
} else {
    return '---';
}


i got error Notice: Array to string conversion in vault.php on line 57 Array

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK