I know it's a syntax error but I can't quite pin it down and need help doing so.
Parse error: parse error, unexpected ';' in C:\postchat.inc.php on line 140
Well, here's the if statement line 140 is contained within.
[php]
if (strtolower($info['gender'])=="male") {
$lookat="You looked at <b><i>".ucfirst($info['cn'])."</i></b> and see that he is a <b><i>".strtolower($info['gender'])." ".strtolower($info['race'])."</i></b>.
He also appears to be a <b><i>".strtolower($info['cl'])."</i></b>.
<b><i>".ucfirst($info['cn'])."</i></b> seems to be <b><i>".strtolower($info['he'])."</i></b> in height, <b><i>".strtolower($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolower($info['bu']."</i></b>.
<b><i>".ucfirst($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders.
Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
//Line 140 is the next line
."
<b><i>".ucfirst($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";
} elseif (strtolower($info['gender'])=="female") {
$lookat="You looked at <b><i>".ucfirst($info['cn'])."</i></b> and see that she is a <b><i>".strtolower($info['gender'])." ".strtolower($info['race'])."</i></b>.
She also appears to be a <b><i>".strtolower($info['cl'])."</i></b>.
<b><i>".ucfirst($info['cn'])."</i></b> seems to be <b><i>".strtolower($info['he'])."</i></b> in sheight, <b><i>".strtolower($info['we'])."</i></b> in weight, and her body seems <b><i>".strtolower($info['bu']."</i></b>.
<b><i>".ucfirst($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on her shead, ".$flear." ".$frear." and ".$inv['shoulders']." on her shoulders.
Extending from her shoulders, she has <b><i>".$inv['shoulders']."</i></b>. she also wears ".$inv['body']." on her body, ".$inv['waist']." around her waist, and ".$inv['legs']." on her legs.
<b><i>".ucfirst($inv['user'])."</i></b> also has ".$inv['feet']." on her feet.";
}[/php]
Any insights?
4 1802
The error is here in the 4th line:
[php]strtolower($info['bu'][/php]
missing closing parenthesis, so
[php]strtolower($info['bu'])[/php]
But then you run into other problems, so the complete assignment statement should be like
[php]$lookat= "You looked at <b><i>".ucfirst($info['cn'])."</i></b> and see that he is a <b><i>".strtolower($info['gender'])." ".strtolower($info['race'])."</i></b>".
"He also appears to be a <b><i>".strtolower($info['cl'])."</i></b>".
"<b><i>".ucfirst($info['cn'])."</i></b> seems to be <b><i>".strtolower($info['he'])."</i></b> in height, <b><i>".strtolower($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolower($info['bu'])."</i></b>".
"<b><i>".ucfirst($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders".
"Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
"<b><i>".ucfirst($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";[/php]
Ronald :cool:
The error is here in the 4th line:
[php]strtolower($info['bu'][/php]
missing closing parenthesis, so
[php]strtolower($info['bu'])[/php]
But then you run into other problems, so the complete assignment statement should be like
[php]$lookat= "You looked at <b><i>".ucfirst($info['cn'])."</i></b> and see that he is a <b><i>".strtolower($info['gender'])." ".strtolower($info['race'])."</i></b>".
"He also appears to be a <b><i>".strtolower($info['cl'])."</i></b>".
"<b><i>".ucfirst($info['cn'])."</i></b> seems to be <b><i>".strtolower($info['he'])."</i></b> in height, <b><i>".strtolower($info['we'])."</i></b> in weight, and his body seems <b><i>".strtolower($info['bu'])."</i></b>".
"<b><i>".ucfirst($inv['user'])."</i></b> wears <b><i>".$inv['head']."</i></b> on his head, ".$mlear." ".$mrear." and ".$inv['shoulders']." on his shoulders".
"Extending from his shoulders, he has <b><i>".$inv['shoulders']."</i></b>. He also wears ".$inv['body']." on his body, ".$inv['waist']." around his waist, and ".$inv['legs']." on his legs.".
"<b><i>".ucfirst($inv['user'])."</i></b> also has ".$inv['feet']." on his feet.";[/php]
Ronald :cool:
Soo.. you're saying I embed each break in the code?
No not really. But I got another parse error after I changed the first one, so I (hastily) changed it into the way I showed it.
Ronald :cool:
Really? I thought web browsers only recognized one space so you could make all the white space you wanted....
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Michael Flanagan |
last post by:
Of course "echo" is working, but I've got a case where php doesn't
seem to be sending out the result of an "echo." I'm probably doing
something wrong, but I can't see it.
I've got the following...
|
by: Neil |
last post by:
Hello,
I do hope some kind soul can help me with what I thought was not going
to be difficult, but for this newbie it's a bit harder than I thought.
Here's what I'm trying to do.....
I can...
|
by: nek |
last post by:
Hi,
Is it possible to echo a newline in window shell script?
eg.
@echo this is the 1st line
@echo ???
@echo this is the 3rd line
The result expected:
|
by: hamil |
last post by:
I wrote a VB.net "echo" program using the Tcp client/listener class to
determine how fast the transactions would occur. I got a speed of about 160
echoes per second. A friend did the same test...
|
by: fiziwig |
last post by:
This was origianlly one line and was acting strange so I divided it
into three lines and it still acts the same strange way:
Code, cut and pasted from script:
....
$rec_count=$_GET;...
|
by: Patrick |
last post by:
Hi All,
Why does this work in Internet Explorer, but not Mozilla?
I'm reading from a flat file.
As an examle the value of colm1 read from the file is B.
I set in the form page;
<?php $A...
|
by: L. Berger |
last post by:
Hi,
I am working on an HTML template which has a lot of html tags, with
PHP data shown in the middle of these tags -- you know, the usual.
Currently, I have HTML as is, and many many "echo...
|
by: mandanarchi |
last post by:
<?php
$td_sku="1088963";
//Following the XML data
$xmldata="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r
<OnlineCheck>\r
<Header>\r
<BuyerAccountId>----------</BuyerAccountId>\r...
|
by: Request-1 |
last post by:
hi folks,
html coder here, new and terrified * of php!!
aaaaaa!
i'm trying to bury a JS script to rotate a photo, in a page i converted from
html to php.
the conversion went well, it was to...
|
by: Alchamist |
last post by:
Hi guys,
I am rewriting an old telnet server of mine from VB6 to C#. I do not have access to VB6 any more, so I cannot (nor do I really want to) use VB6 references.
Everything is working well,...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |