Guys I was learning to solve a ctf and saw this line in php
${"result$i"} = $db->query("SELECT * FROM {$tables[$i]} " . ($order != '' ? "ORDER BY ".$db->escape_string($order)." " : ""));
This is in a for loop with $i as incrementer,So what is didnt understand happening is the following
- what is the meaning of this:
${"result$i"}
- putting
$tables[$i]
inside { } - Can someone explain this bit :
($order != '' ? "ORDER BY ".$db->escape_string($order)." " : "")