Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> Off Topic
panther_dust

PHP???????

Well as you may have guest i am trying to edit some php for another website i am building and im wondering if anyone can help me with my LAST error that is doing my head in lol.....

this is the error
Code:
Notice: Undefined offset: 4 in
C:\wamp\www\Unnamed Site 1\script.php
on line 13


And this is my php code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<font color="#FF0000">    
         <?php
$quote=file("quotes.txt");
$totalnumberofquotes=count($quote);
$rdm=rand(1,$totalnumberofquotes);
echo $quote[$rdm];?></font>
</body>
</html>


With this being LINE 13
Code:
echo $quote[$rdm];?></font>


ANY help apreciated.... thanks ppl

PD
editor

Should be rdm-1
panther_dust

WOW lol thanks dude, i feel so stupid now haha, just 2 letters and it's all working haha......
again thank you dude... life saver... :P

       myfreeforum.org Forum Index -> Off Topic
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum