I am trying to convert a $_POST from lowercase to uppercase. The variable is an array and I have tried strtoupper but it just does not display as uppercase. What would be the correct way to achieve this result based on my code. Thanks
$array = array();
$array = $_POST['file_add'];
$outString = '';
foreach ($array as $file) {
$file = mysql_real_escape_string($file);
$sql = "SELECT custref FROM files WHERE custref = '$file'";
$result = mysql_query($sql) or die ('{"opp":"error","file":"' . mysql_error() . '"}');
// If there are dupe entries, send message to jquery
if (mysql_num_rows($result) > 0) {
$outString .= $file . ' ';
//echo $output;
}
}
if ($outString) { // if there are numbers in this string, then there are error Duplicates
$error = array('opp' => "error", 'file' => $outString); // box will have the TEXT for your Dialog Text
// IMPORTANT, changed JSON output to use an Opperation (opp) to indicate
// in javascript if there was an error OR not
$output = json_encode($error);
echo $output;
exit();
}