summaryrefslogtreecommitdiff
path: root/utils/convert.php
blob: 4471e8f43c3b3931499a4aa705b611dd970d53c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

function convert($message)
{
	$message = stripslashes($message);
	$message = htmlspecialchars($message, ENT_QUOTES, "UTF-8");
	//	$message = utf8_encode($message);
	return $message;
}

function convert_array($vs)
{
	$vars = array();

	if(sizeof($vs)) {
		foreach($vs as $k => $v) {
			$vars[$k] = convert($v);
		}
	}

	return $vars;
}

?>