Excellent! it works.

I’m still a PHP beginner and thanks for the link of debugging.
I’ll use those methods from now on 🙂
thank you so much John.
as shown in the below pics, that’s what I get (before & after)
Before: using the first code snippet

After: using the second snippet

Thanks, John. I like this idea you provided.
But unfortunately, this code snippet didn’t work.
Is there any other way?