I'm trying to get an array() inside of a function in PHP.
$CheckInfo->gatherInfo(array("hej", "ds"), "email");
And then collect it as:
public function checkSecurity($input, $type){
// Set new varibels
$input = htmlentities(addslashes($input));
$type = htmlentities(addslashes($type));
$this->findPath($input, $type);
}
But once I do use htmlentities(addslashes)) if gives me this error:
Warning: addslashes() expects parameter 1 to be string, array given in
Without addslashes and htmlentities, it gives me a return on "array". How may I use a array, read it and use it in a function?
foreach-loop, and use those functions on each element in the array. If you try to treat an array as a string, it will outputArray.findPathexpects? An array or a string?