Jump to content

I'm new as you may guess..


captnbob

Recommended Posts

I can't seem to figure out what wrong here.  I keep getting this error and can't figure out what is wrong.

 

Parse error: syntax error, unexpected T_STRING in /home/captnbob/public_html/www/header.php on line 53

 

Here is the bit of code from line 50 thru 57

 

<?php

include "myownrecommend.php";

$i = rand(1,count($myownrecommend));

$url=$myownrecommend[$i]['url'];

$image=$myownrecommend[$i]['image'];

$titre=$myownrecommend[$i]['titre'];

include "myownnews/config.php";

?>

 

Please help, Captnbob

Link to comment
https://forums.phpfreaks.com/topic/187573-im-new-as-you-may-guess/
Share on other sites

No it does not happen randomly, it happens every time I try and open the file. I tried the code you suggested and got the same results. 

 

Thanks for the suggestion, Captnbob

 

 

Does the error happen randomly? I'm just surprised you don't have this:

$i = rand(0,count($myownrecommend) - 1);

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.