First, I would recommend that you don’t post PHP code (and even don’t work with PHP code, working with static HTML to get started), since you’re dealing with a HTML + JavaScript task, not a PHP task. There are a lot of different languages involved in web development, so it’s crucial to identify which ones are needed for a given task, so you can break up your work in manageable steps.
Then, my advice would be to not use a slider in a lightbox, because you’re going to need to wrangle two scripts which create DOM nodes on the fly and will need to setup one then the other in the right order with the right data… for each click on one of the thumbs. That’s doable, but not fun at all.
Instead, I would recommend using the PhotoSwipe library, which does basically the same thing but in one (more focused) plugin. See its documentation for how to feed it the full list of (big) images, the start offset, etc.
I open the swiper slider in a lightbox by click on an image.
Is there a possiblity with PHP to get the number of the clicked Image, load it in the slider and show all the other project images in the slider?