added the follow:
/**
* Convert all '&' to '&' from the input
* @param string any string input, mainly URLs.
* @return input with & replaced to '&'
*/
convert_amp($input);
return $return;
}
+
+/**
+ * Convert all '&' to '&' from the input
+ * @param string any string input, mainly URLs.
+ * @return input with & replaced to '&'
+ */
+function convert_amp($input){
+ $input = str_replace('&', '&', $input); //convert everything to '&' first
+ return str_replace('&', '&', $input);
+}
+
/**
* Check if json_encode/json_decode exists, if not, use the json service library.
* NOTE: json_encode(), json_decode() are NOT available piror to php 5.2