<?php

/**
 *
 * @copyright  2010-2021 frasq.org
 * @version    3
 * @link       http://www.frasq.org
 */

function readarg($s, $trim=true, $strip=true) {
	if (is_array($s)) {
		$r=array();
		foreach ($s as $ss) {
			$r[]=readarg($ss, $trim, $strip);
		}
		return $r;
	}

	if ($trim) {
		$s = trim($s);
	}

	if ($strip) {
		$s = strip_tags($s);
	}

	return $s;
}

