PHP webpage & array print issue


Posted on 16th Feb 2014 07:03 pm by admin

I have this code running, and it works perfectly … however, see my bottom bit about what I see when I view source, versus what I want to see … I am having image re-sizing issues that started when I use this code. When I hard code img tags directly to the images, all works fine.

rotate.php
Code: <?php
$images=array(
"darin_1.jpg", "darin_2.jpg", "jeffb_1.jpg", "jeffb_2.jpg", "jeffb_3.jpg", "glenda_1.jpg", "glenda_2.jpg", "glenda_3.jpg", "glenda_4.jpg", "kevin_1.jpg", "kevin_2.jpg", "kevin_3.jpg", "kevin_4.jpg",
"petrina_1.jpg", "petrina_2.jpg", "mia_1.jpg", "mia_2.jpg", "dale_1.jpg", "paul_1.jpg", "raino_1.jpg", "raino_2.jpg", "raino_3.jpg", "sherri_1.jpg", "sherri_2.jpg"
);
$total=count($images);
$secondsFixed=5; // seconds to keep list the same
$seedValue=(int)(time()/$secondsFixed);
srand($seedValue);
for ($i=0;$i<$total;++$i) // shuffle list 'randomly'
{
$r=rand(0,$total-1);
$temp =$images[$i];
$images[$i]=$images[$r];
$images[$r]=$temp;
}
$index=(int)($_GET['i']); // image index passed in
$i=$index%$total; // make sure index always in bounds
$file=$images[$i];
header("Location: $file"); // and pass file reference back
?>

97 Like 23 Dislike
Previous php-forum Next php-forum
Other php-forum

Placing and array within an array then sorting it!
I have a page that runs two large mysql queries and saves the results into arrays, in php I then per

help finding hacking loopholes
i was attacked by a redirect php injection

my pc is clean of viruses

so i figure that

How to read posted binary data from a mobile device and post it to a web server?
Here is the senario...

I have a mobile device (MD) that posts binary data to a Web Server (WS

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

Send current URL in URL with a $_GET variable problem.
Hello community,

I have created a function that gets the current variable of a page, example:

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash