php use within a fucntion undefined error code example Example: undefined variable inside function php $myId = 0; function run(){ global $myId; echo $myId; }