php help
php help
- Started
- Last post
- 5 Responses
- seeessess0
10 print images/image_000.jpg
20 goto 10- I thinkseeessess
- You forgot RUN on line 3. That's your problem right there.Continuity
- toe_knee0
Is the problem iwith the quotation marks maybe
print '<media file="images/image_' . $image_prefix . $i . '.jpg"></media>';
Cause the output needs to be:
<media file="images/image_000.jpg"></media>
- PersonaNonGrata0
what isnt working about it?
Does it not outupt anything? is it giving you the wrong number of zeros....
- PersonaNonGrata0
works perfectly when I ran it here : http://sandbox.onlinephpfunction…
- vdc0
Your code works fine, although this does the same thing in fewer lines:
for ($i=0; $i < 200; $i++) {
print '<media file="images/image_' . sprintf("%03d", $i) . '.jpg"></media>';
}