Jump to content

Getting a picture


Zeroshade

Recommended Posts

I have put two images into an array like so

[code]<?php
$picture[] = 'images\blue-carry.jpg';
                                                        $picture[] = 'images\blue-ebook.jpg';
                                                        echo '<img src="'.$picture[0].'" />';
?>[/code]

How can I set a timer up so that the one picture will fade and then reappear in say 5 seconds into the upcoming picture in the array?
Link to comment
https://forums.phpfreaks.com/topic/29610-getting-a-picture/#findComment-135901
Share on other sites

Here an updated piece of code.
[code]<?php
                                                $increment;
$picture[] = 'images\blue-carry.jpg';
                                                        $picture[] = 'images\blue-ebook.jpg';
                                                        for ($increment = 0; $increment < 3; $increment++)
                                                        echo '<img src="'.$picture[$increment].'" />';
?>[/code]

But this places the image below the last one. How can i set a timer so that it replaces the old one in 5 seconds?
Link to comment
https://forums.phpfreaks.com/topic/29610-getting-a-picture/#findComment-135910
Share on other sites

Is it possible to do this in php? The reason is, the last time I used javascript in my xhtml, i had marks taken off because javascript slows the page down. So, php counters that because the page won't be slowed down because of it. Therefore, I'm learning php very quickly, and I thought I read something up on Timer.php? Am I wrong in assuming there is a way to do this in php?
Link to comment
https://forums.phpfreaks.com/topic/29610-getting-a-picture/#findComment-136173
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.