Quoting Mark Sargent [EMAIL PROTECTED]:
Hi All,
can anone see what's wrong with the below code? I get this error,
*Parse error*: syntax error, unexpected '}' in
*/usr/local/apache2/htdocs/moviedata2.php* on line *18
*
$age=1;
while($age=100) {
$insert = INSERT INTO age (age_label) VALUES
how about like this
---
$insert = INSERT INTO age (age_label) VALUES ('$age');
---
From: Mark Sargent [mailto:[EMAIL PROTECTED]
Sent: Sat 03-Jun-2006 10:02
To: PHP List
Subject: [PHP] Parse error: syntax error, unexpected '}'
Hi All,
can anone see what's
Hi All,
sorry, found it. Forgot the ; after $age++. Cheers.
Mark Sargent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mark Sargent wrote:
Hi All,
I get the error for line 15 for this code,
?php
15 echo font face='$_SESSION['font']';
16 echo size='$_SESSION['size']';
17 echo color='$_SESSION['colour']';
18 echo $_SESSION['text'];
19 echo /font;
20 ?
I have put ' ' quotes around
Mark Sargent wrote:
Hi All,
I get the error for line 15 for this code,
?php
15 echo font face='$_SESSION['font']';
16 echo size='$_SESSION['size']';
17 echo color='$_SESSION['colour']';
18 echo $_SESSION['text'];
19 echo /font;
20 ?
I have put ' ' quotes around the
Mark Sargent wrote:
Hi All,
this code,
?php
$flavour[] = blue raspberry;
$flavour[] = root beer;
$flavour[] = pineapple;
sort($flavour);
print_r($flavour);
echo br;
echo My favourite flavours are:br;
foreach ($flavour as $currentValue) {
//these lines will execute as long as there
On 24/05/06, Mark Sargent [EMAIL PROTECTED] wrote:
Hi All,
this code,
?php
$flavour[] = blue raspberry;
$flavour[] = root beer;
$flavour[] = pineapple;
sort($flavour);
print_r($flavour);
echo br;
echo My favourite flavours are:br;
foreach ($flavour as $currentValue) {
//these
Mark Sargent wrote:
Hi All,
this code,
?php
$flavour[] = blue raspberry;
$flavour[] = root beer;
$flavour[] = pineapple;
sort($flavour);
print_r($flavour);
echo br;
echo My favourite flavours are:br;
foreach ($flavour as $currentValue) {
//these lines will execute as long as there
Chris wrote:
Since there aren't actually 18 lines this isn't the real code..
true, as I only posted the php code
The problem is here:
echo $currentValue br\n;
it should be
echo $currentValue . br\n;
or
echo $currentValue , br\n;
thanx to all. The book is Beginning PHP, Apache, MySQL,
9 matches
Mail list logo