Virtual Airline Dispatch Generator
Prepare once - execute multiple times

Prepared statements not only prevent SQL injection, but also enable you to only prepare a statement once, and then execute it multiple times with different values for increased performance:

$query_run = $db-&gt;prepare("SELECT `length_ft` FROM `runways` WHERE `airport_ident` = :ident");
$query_run-&gt;bindParam(":ident", $i);

foreach ($a as $z) {
    $i = $z['ident'];
    $query_run-&gt;execute();
    [...]
}


Naming


don't use short, non-expressive variable names. a, z, i (as non-loop variable), b, etc are not telling a reader much.
use either camelCase or snake_case, but don't mix them.
write out words. what's an org or a des? what is a destin? why is ident an originAirport? 
What's a num? (ok, a number, but what kind of number? Seems to be a counter, so counter would be more fitting. But what does it count?
int is also not a very good name. It seems to be a random index? Then randomIndex would be better.


Misc


variables which are only used in one place, and whos name doesn't really add anything can be removed. Eg $count = count($b); is not needed, just use this directly: $int = rand(0, count($b));
if you split your code up into methods, it will be easier to read. You might have methods such as getOriginAirport, meassureDistancesFrom, getFlightId, getRunwayInfo, etc.