Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP

Name: Alex 2010-04-17 0:42

    function randomAlbum($singleRandomArtist)
    {
        $artists = file('resources/artists.txt');
        $firstReturn = true;
        foreach ($artists as $singleArtist)
        {
            $randomArtist = explode("~", $singleArtist);
        if ($firstReturn == true)
        {
        echo $randomArtist[$singleRandomArtist]; *****
        $firstReturn = false;
        }
        else;
        }
    }
    function getRandomInt($min, $max)
    {
        $validRand = false;
        while ($validRand == false)
        {
            $random = rand($min, $max);
            if (($random % 3) == 0)
            {
                $validRand = true;
            }
            else;
        }
        return $random;
    }

The line with the *** next to it is giving me an undefined offset error. Any ideas why? Im rather new to php, so be nice!

Name: Anonymous 2010-04-17 0:51

Now you have the problem of me coming and shoving my large foot up your ass you piece of shit

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List