Amezis
Dec 30 2005, 02:19 PM
| | I am getting this message when testing a script I made: QUOTE Parse error: parse error, unexpected $ in /home/globa38/public_html/forum/mods/phpbb_fetch_all/news/forumnews.php on line 159
On line 159, which is the last line in that file, I can only see this:CODE ?>
What's the problem, and how can I fix it?  |
Reply
sxyloverboy
Dec 30 2005, 02:24 PM
can you post codelines 150 - 170? that would give some more insight on this problem.
Reply
Amezis
Dec 30 2005, 02:30 PM
CODE <? for ($i = 0; $i < count($news); $i++) { { $max_length = 27; $title = ($news[$i]['topic_title']); $title_length = strlen($title); if ($title_length > $max_length) { $title = substr_replace($title, '...', $max_length); } ?> <tr> <td class="newshover"> <?php echo append_sid('http://forum.global-rs.com/viewtopic.php?t=' . $news[$i]['topic_id']); ?>"> <?php echo date('d-M-Y',$news[$i]['post_time']); ?> - <?php echo($title); ?></a></td> <tr> <?php } ?>
Reply
sxyloverboy
Dec 30 2005, 03:01 PM
hmm idunno maybe you can try this: change CODE <?php echo date('d-M-Y',$news[$i]['post_time']); ?> - <?php echo($title); ?></a></td> to: CODE <?php echo date('d-M-Y',$news[$i]['post_time']); ?> - <?php echo $title; ?></a></td>
Reply
rvalkass
Dec 30 2005, 03:34 PM
As far as I can see you have some extra braces. You have one extra { at the beginning that is never closed. Also, try not to break out of PHP into HTML in the middle of a for loop, as it can sometimes cause problems. Just put each line as an echo.
Reply
Amezis
Dec 30 2005, 05:37 PM
Okay, I have changed the code as you said, sxyloverboy, and I have put the HTML code in echo(). But still, the problem is happening.
Reply
sxyloverboy
Dec 30 2005, 05:53 PM
hm looking at this thread i see that the problem was a curly brace "{" that wasnt closed. look though all of your code to see if you find something that you havent closed. if that dosent help i dunno.
Reply
beeseven
Jan 7 2006, 07:26 PM
When it says that there's an unexpected $ on the last line of the file, that always means that you didn't close all of your curly braces ( { ).
Reply
Similar Topics
Keywords : unexpected, arent
- Unexpected T_string In User.php [resolved]
(5)
Unexpected T_variable...
Help! (3) I did construct the database connection file which is called "config.php". But, I got some mistake
that has to be solved to continue with working. This is the code itself: //Set the database
values $confg ="alex1985_admin" //Your database username $confg ="" //Your database
user's password $confg ="localhost" //Your host $confg ="books" //Your database name
//Create the function to log into the DB function db_login() { global $confg; $link =
@mysql_connect($confg , $confg , $confg ) or die("Error connecting: " . mysql....
Php Escaped Control Characters And Windows
they aren't working for me. (3) In php coding, when you escape certain characters, they have an impact on the output of an
echo'd or printed string. ie "\r\n\t" should give you a new line and a tab before
outputting the content for a line of printing. They vary by OS, I know, but I have tried all the
variations I can think of and can't seem to control output using them. Believe me, I have tried
multiple variations and nothing works for me. I have checked the php.ini file for settings but I
can't find where you can modify them. So the question is : Where do i look to conf....
Parse: Error Unexpected T_lnumber
php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files
and replace it with a new file with some new content, effectively moving the contents from one file
to another. These are the first 50 lines of the file: /* Calculate For The "A" Group - The
Latest Games ID */ $a_B = 002; while(file_exists("a_" . $a_B . ".dat")) {
$a_B++; } $new_page_contents = " " . $_POST . " " . $_POST . "
include \"/home/cmatcme/public_html/footer.php\"; ?> "; $a_stream = fopen(&....
Parse Error
unexpected $ (1) i have this code CODE <?php if($_POST['user']=="" or
$_POST['pass']=="" or $_POST['host']==""
or $_POST['root']=="" or
!isset($_POST['run'])){ print('<form method=post
name=form>'); print('FTP username <input type=\'text\'
name=user value=""><br>'); print('FTP password <input
type=\'password\....
Unexpected "$" Sign On Last Line Of File
even if i change the line nos it's there (3) I am trying to create a file which send mail after a user has filled in the appropiate fields in a
form. It checks to see whether the required fields are full, writes some mail headers and sends it.
When I check to see if the code works, I get this error: QUOTE(affliates.cmat) Parse error:
parse error, unexpected $ in /home/cmatcme/public_html/affliates.cmat on line 203 The
funny thing is that regardelss of how long I make the file, the file always appear on the final
line, whether I leave it blank or just put ?> . I understand that these errors ca....
Unexpected $
what does it mean (9) You see I have a most intresting problem, basicaly I get the following error: QUOTE Parse error:
parse error, unexpected $ in /path/result.php on line 99 Now normaly when I have problems
I go to line 99 and add a ; or a " or something the problem is in my file line 99 is , CODE
<tr bgcolor="#FFFFFF"> <td width="25" height="5"
background="images/q3.png"> </td> <td height="25"
align="right" valign="top" background="images/bot.png"><span cla....
Looking for unexpected, arent
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for unexpected, arent
*MORE FROM TRAP17.COM*
|
advertisement
|
|