I’m pretty new to PHP and want to write a “for” statement based on IDs of a page. The problem is that the IDs are not sequential (by that I mean they are not increasing by 1 each time ie. 1,2,3,4,5). Is there a way to use “for” to use specific numbers? For example (pseudocode)
for IDnumbers i = (1,5,7,23,28,34)
echo "function1(i)"
echo "function2(i)"
end
I hope that makes sense. I basically want functions associated with each post ID to be returned, but I want the IDnumbers to be specific. Sorry if this is a basic question!
edit: wow, that really was basic. Thanks guys!
1 Answer