Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2003, 10:04 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Professional PHP4 - Ch10 Coding Ftp Client Errors

Get the following error when trying run the code out of the box:

Parse error: parse error, unexpected ',' in /home/jberry/html/ftp/ftp_client.php on line 293


Below is line 293-294

293 echo("<option value=\"{$ftp->cwd}\"> . ({$ftp->cwd})</option>\n",
294 "<option value=\"{$ftp->cwd}/..\"> .. </option>\n");


If i remove the comma, it give a similar error, referencing and unexpected "/" in 294.

any ideas?

  #2 (permalink)  
Old January 11th, 2004, 03:23 AM
Registered User
 
Join Date: Jan 2004
Location: Barnaul, Alt, Russia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to visor
Default

Quote:
quote:Originally posted by ajberry_12
 Get the following error when trying run the code out of the box:

Parse error: parse error, unexpected ',' in /home/jberry/html/ftp/ftp_client.php on line 293


Below is line 293-294

293 echo("<option value=\"{$ftp->cwd}\"> . ({$ftp->cwd})</option>\n",
294 "<option value=\"{$ftp->cwd}/..\"> .. </option>\n");


If i remove the comma, it give a similar error, referencing and unexpected "/" in 294.

any ideas?

try
293 echo("<option value=\"{$ftp->cwd}\"> . ({$ftp->cwd})</option>\n"[u].</u>
294 "<option value=\"{$ftp->cwd}/..\"> .. </option>\n");


  #3 (permalink)  
Old January 13th, 2004, 12:35 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

What you're doing is right but the syntax is a bit off.

The blueprint for echo is as follows:

echo [expression[, expression[, expression[, ...]]]]

So this being the case the following will work

<?php

// parenthesis are optional with echo.
// Works

echo "Hello, ", "world!";

// If you do include parenthesis, then this is the syntax
// Works

echo ("Hello, "), ("world");

// OR

echo ("Hello, "),
     ("world!");

// Echo isn't a function, but a language construct, and as per the blue print above
// This won't work

echo ("Hello, ", "world!");

?>

http://www.php.net/echo

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
code for professional php4 multimedia programming? netpresent Wrox Book Feedback 1 February 9th, 2005 10:44 PM
Professional PHP4 agarios All Other Wrox Books 6 January 14th, 2005 02:50 PM
Multi Select List Box Coding Errors... snoopy92211 VB Databases Basics 10 June 30th, 2004 08:33 AM
Errors in the book @ ch10 freezotic BOOK: Beginning Java 2 0 March 26th, 2004 04:54 PM
where is Professional PHP4 XML Source Code dreamery Wrox Book Feedback 3 January 27th, 2004 04:16 PM



All times are GMT -4. The time now is 08:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.