Mombu the Php Forum

  Mombu the Php Forum > Php > parse error


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
11 6th September 03:33
jerry stuckle
External User
 
Posts: 1
Default Parse error


Of course - your html is invalid. Let's reformat it so it makes some sense:

echo("<a href='" . $mylist[$picker][0] . " '";
if( $mylist[$picker][0] == true ) {
echo " target='_blank'"; }
echo "><img alt='" . $mylist[$picker][1] . "' src='" .
mylist[$picker][2] . "' /></a>");

Note the first line has unmatched parens, for instance.

The first thing you need to do is format your PHP properly; a lot of
times obvious errors show up immediately.

Another thing which will help is to get a syntax-highlighting editor. I
use Crimson editor, which isn't necessarily the best for PHP, but works
with several languages and does what I need.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


12 6th September 03:33
jeff north
External User
 
Posts: 1
Default Parse error


On Sun, 09 Dec 2007 23:14:54 GMT, in alt.php "@Homeonthecouch"
<me@home.com>


I agree with Jerry. Properly formatted code makes the code, and any
errors, easier to detect.

Regarding text editors. There are numerous ones out there. I use
either Textpad or Notepad++. Notepad++ has better syntax and bracket
highlighting features.

[snip]
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------
  Reply With Quote
13 6th September 05:00
jerry stuckle
External User
 
Posts: 1
Default Parse error


I mean your PHP is invalid...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Reply With Quote
14 6th September 05:00
External User
 
Posts: 1
Default Parse error


Jerry,
Thank you for the advice.
I am a total novice and have obtained this script, without the added opening
some pages in a new window, from the net.
The help came from Jeff.

Jeff,
The code you gave me was the code that wouldn't work?

Any help is always appreciated.

Andrew.
  Reply With Quote
15 6th September 05:00
jeff north
External User
 
Posts: 1
Default Parse error


On Mon, 10 Dec 2007 19:36:18 GMT, in alt.php "@Homeonthecouch"
<me@home.com>

The code I gave you did work.
You introduced the error by using
echo (
Remove the ( and all will be well.

[snip]
-- -------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
-- -------------------------------------------------------------
  Reply With Quote
16 6th September 05:00
External User
 
Posts: 1
Default Parse error


Many thanks to Jeff and Jerry.

You have been very helpful.

Andrew
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666