$sanitizer->arrayVal() method

Simply sanitize value to array with no conversions

This is the same as the array() sanitizer except that it does not attempt to convert delimited/csv strings to arrays. Meaning, a delimited string would simply become an array with the first item being that delimited string.

Available since version 3.0.165.


// basic usage
$array = $sanitizer->arrayVal(mixed $value);

// usage with all arguments
$array = $sanitizer->arrayVal(mixed $value, $options = []);


options (optional)

Return value



Method can throw exceptions on error:

  • WireException

$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.209

Twitter updates

  • Adding custom actions to ProcessWire image fields in the admin, part of this week’s dev branch additions: More
    27 January 2023
  • ProcessWire 3.0.210 new main/master version released— More
    6 January 2023
  • ProcessWire 3.0.209: Core updates and an interesting AI that knows ProcessWire– More
    30 December 2022

Latest news

  • ProcessWire Weekly #455
    In the 455th issue of ProcessWire Weekly we'll check out the latest core updates, introduce a new third party module called JkPublishPages, and more. Read on!
    Weekly.pw / 28 January 2023
  • ProcessWire 3.0.210 new main/master version
    140 commits, 55 resolved issues, dozens of new features, eight contributors, and five new pull requests make yet another great new version of ProcessWire.
    Blog / 6 January 2023
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer