Skip to content
Advertisement

How can I echo ‘for’ loop here

I want to use $i into his PHP condition how can I do this? I have no idea how to echo into condition. plz see the code and if you can plz help me. thank you advanced.

JavaScript

Advertisement

Answer

To accomplish what you are trying to do, simply follow this example:

JavaScript

becomes

JavaScript

So you basically take the string you want (which should be the name of an existing variable) and wrap it with ${}

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement