so this is kinda hard to form a question about my issue so just picture what i'm going to explain,
image you have a list of multiple strings that contain characters from A to Z after Z it goes to AA, AB, AC etc etc...
I want to get the highest on the list for that i'm trying to do something like this:
$max_letter = "A";
while($row = mysqli_fetch_assoc($recordset)) {
if($row["new_letter"] > $max_letter) {
$max_letter = $row["new_letter"];
}
}
the problem with this is that when $row["new_letter"]
is equal to "AA"
and $max_letter
is equal to "Z"
it doesn't update $max_letter
to "AA"
because it thinks "Z"
is higher than "AA"
but if i do something like this:
$str = "Z";
echo ++$str;
my output will be
AA
example of my problem:
$str = "Z";
echo ++$str;
echo "<br><br>";
if("AA" > "Z") {
echo "higher";
}elseif("AA" == "Z") {
echo "equal";
}elseif("AA" < "Z") {
echo "lower";
}