"He knows what is before them" concerning the affairs of the Hereafter, "and what is behind them" concerning the affairs of the world; that is, since they have arrived in the Hereafter. "And they do not encompass Him in knowledge," meaning: and He knows what they do not encompass in knowledge; that is, what they do not know.
﴿يعلم مَا بَين أَيْديهم﴾ مِنْ أَمْرِ الْآخِرَةِ ﴿وَمَا خَلْفَهُمْ﴾ من أَمر الدُّنْيَا؛ أَي: إِذْ صَارُوا فِي الْآخِرَةِ ﴿وَلا يُحِيطُونَ بِهِ علما﴾ أَيْ: وَيَعْلَمُ مَا لَا يُحِيطُونَ بِهِ عِلْمًا؛ أَيْ: مَا لَا يعلمُونَ