test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • bit stupid Friend
    #191376

    Hey guys

    looking for what I think looks like some PHP help.

    I have added some custom images to the randomly rotating header image and they atre displaying fine. I even added in an extra image found the code below that I needed to edit to get all 4 images displaying.

    <style type=”text/css”>
    #ja-header .main {
    background-image: url(<?php echo T3Path::getUrl(‘/images/header/header’. rand(1,4).’.jpg’); ?>);

    So now I want to know how to I change this so it displays in order ie header1 then header2 then header3 then header4. I am guessing it is something to do with the “. rand” part of the above but I do not know what to change it to.

    Any clues.

    phong nam Friend
    #509171

    Hi,

    You can use the sort() function rather than rand() by refering this detailed example at http://php.net/manual/en/function.sort.php

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  phong nam 11 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum